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

@ncpa0cpl/vanilla-jsx

v0.0.1-alpha.53

Published

*VanillaJSX provides a syntactic sugar for creating HTMLElements.*

Readme

VanillaJSX

VanillaJSX provides a syntactic sugar for creating HTMLElements.

It is a JSX render library that compiles JSX directly to real DOM elements — no virtual DOM, no diffing, no re-render loop. JSX runs once, eagerly building real HTMLElements, and all dynamic behavior is driven by signals bound to element attributes, children and event listeners at creation time.

These two snippets are equivalent:

const container = document.createElement('div');
const header = document.createElement('h1');
header.textContent = 'Hello, world!';
header.classList.add('custom-header');
container.setAttribute('id', 'header-container');
container.appendChild(header);
const container = (
    <div id="header-container">
        <h1 class="custom-header">Hello, world!</h1>
    </div>
);

Installation

yarn add @ncpa0cpl/vanilla-jsx

Enable the JSX transform in your tsconfig.json:

{
    "compilerOptions": {
        "jsx": "react-jsx",
        "jsxImportSource": "@ncpa0cpl/vanilla-jsx"
    }
}

Set the same option in your bundler, e.g. for esbuild:

esbuild
  .build({
    jsxImportSource: "@ncpa0cpl/vanilla-jsx",
    ...rest
  })

Quick example

import { sig } from "@ncpa0cpl/vanilla-jsx/signals";

function getCounterComponent() {
    const counter = sig(0);

    return (
        <div>
            <button
                class={counter.derive(c => `counter_${c}`)}
                onClick={() => counter.dispatch(current => current + 1)}
            >
                Click me!
            </button>
            <p>{counter}</p>
        </div>
    );
}

The built-in signal library is optional — interops are provided for JS Signals, mini-signals and @preact/signals-core, and any other implementation can be plugged in via SignalsReg.

Documentation

| Document | Contents | | --- | --- | | Signals | The built-in signal library: sig, derive, combinators, batching, GC-based cleanup. | | Signal Freezing | Stopping signal driven DOM mutation in selected sub-trees. | | Working with JSX | Setup, elements, fragments, props, events, reactive attributes, class/style, boundSignal, unsafeHTML, components. | | Components | <If>, <Switch>/<Case>, <Range>, <VirtualList>, $component lifecycle, ClassComponent. | | Interop | Registering other signal implementations, swapping the DOM layer. | | Gotchas and limitations | Rendering model, GC cleanup rules, XSS notes, batching semantics, environment requirements. |

License

MIT