npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

yash-react

v1.0.3

Published

A lightweight, production-ready frontend framework built from scratch utilizing a concurrent Fiber architecture, virtual DOM reconciliation, and native state management hooks.

Readme

yash-react ⚛️

A lightweight, production-ready frontend framework built from scratch utilizing a concurrent Fiber architecture, virtual DOM reconciliation, and native state management hooks.

Built to demonstrate the core mechanics of modern UI libraries (like React) without the weight of massive dependencies. Perfect for integrating into custom Vite build pipelines.


🚀 Features

  • Fiber Architecture: Cooperative scheduling using concurrent loops to keep UI rendering smooth and non-blocking.
  • Virtual DOM Diffing: Intelligent reconciliation layers that minimize direct physical DOM manipulations.
  • State & Lifecycle Hooks: Clean implementation of custom useState and useEffect hooks with cleanups.
  • Dynamic Styling: Natively parses both string-based CSS and JavaScript object styles (style={{ ... }}).
  • Zero Dependencies: Pure, vanilla JavaScript optimized to hook seamlessly into modern esbuild and Vite workflows.

📦 Installation

Install yash-react directly into your Vite or modern JavaScript project:

npm install yash-react

⚙️ Quick Start (Vite Configuration)

To compile JSX syntax using this custom framework, configure your vite.config.js to route compilation through the yash-react factory.

Make sure to disable the automatic React runtime by setting jsx: 'transform'.

JavaScript // vite.config.js

import { defineConfig } from 'vite';

export default defineConfig({
  esbuild: {
    jsx: 'transform',
    jsxFactory: 'createElement',
    jsxFragment: 'Fragment',
  },
});

💻 Usage Example

Import your hooks and layout engines straight from the package layout. Here is an example of a self-contained component managing state, side-effects, and dynamic styles.

src/App.jsx JavaScript

import { createElement, useState } from 'yash-react';

function App() {
  const [count, setCount] = useState(0);

  return (
    <div className="app-container">
      <h1>🚀 Welcome to yash-react!</h1>
      <p style="margin-top: 10px; color: #888;">
        Edit <code>src/App.jsx</code> and save to test HMR.
      </p>
      
      <button 
        className="count-button"
        onClick={() => setCount(c => c + 1)}
      >
        Count is: {count}
      </button>
    </div>
  );
}

export default App;

src/main.jsx Initialize the concurrent rendering pipeline and mount it to your HTML file.

JavaScript

import { render, createElement } from 'yash-react';
import App  from './app.jsx';
import './index.css';

const container = document.getElementById("root");
render(<App />, container);

src/index.css Initialise the CSS boilerplate

:root {
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
  --accent-color: #007aff; /* A crisp, system-blue accent */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.app-container {
  text-align: center;
  padding: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.count-button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  margin-top: 24px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.count-button:hover {
  background-color: #005bb5;
  transform: scale(1.05);
}

.count-button:active {
  transform: scale(0.95);
}

📖 API Reference

createElement(type, props, ...children) Generates virtual DOM blueprints. Handles dynamic style configuration objects mapping natively to browser targets, and natively manages Text Nodes.

render(element, container) Initializes the concurrent rendering pipeline and roots the fiber layout tree directly into physical target containers.

useState(initial) Provides component-level state preservation through reconciliation render phases. Supports functional state updates.

useEffect(callback, deps) Invokes execution hooks post-paint phase. Manages structural cleanup functions seamlessly when dependency states alter.

📄 License

MIT License © Yash Raj Gupta