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

snout-jsx

v1.0.1

Published

Snout is a small React-like JSX-supportive framework

Readme

Snout

NPM Version NPM License NPM Type Definitions

Snout is a React-like JSX-supportive framework written in typescript under 400 lines of code.

Why

  • Because if I can't create it, that means I don't understand it (Richard Feynman, probably, idk)
  • I never seem to use idle callback system for managing tasks, it was fun
  • This project completes a trio of backend, data and frontend packages to create web applicaitons from scratch

How

  1. JSX bindings are in jsx-runtime.ts - jsx, jsxs and jsxDEV functions are in essence createElement functions
  2. jsx-runtime.ts also provides JSX.* declarations and a type Element for basic operations, but I recommend using SnoutNode (ReactNode lookalike)
  3. Element's are built until a function component is encountered
  4. When calling render (also available on jsx-runtime.ts) vdom tree is parsed fully into fiber tree that handles what element to process next (chooses parent, child, sibling) by putting it into nextUnitOfWork variable.
  5. There is a running task completion service workLoop using idle callback system
  6. It takes nextUnitOfWork to performUnitOfWork, where magic happens
  7. In essence, DOM is created via createDOM and children are reconsiled in reconsileChildren
  8. Inside that function fiber tree is altered and commitWork is called when it's time to end task in performUnitOfWork
  9. useState hook is provided as a simple way to alter component state to see PoC rendering

Usage

  1. In tsconfig.json alter following properties
{
    "compilerOptions": {
        "jsx": "react-jsx",
        "jsxImportSource": "snout"
    }
}
  1. Use just as React framework
import { render, useState } from "snout";

const App = () => {
    const [count, setCount] = useState<number>(0);

    return <h1 onClick={() => setCount(c => c + 1)}>{`You have clicked me, ${count} times!`}</h1>;
};

render(<App />, document.getElementById("app")!);

Limitations

  1. Multiple text children are failing, use {\`}` to mitigate this problem
  2. Fragments are untested
  3. useState is the only hook provided
  4. When using this framework, ...no interface 'JSX.IntrinsicAttributes' exists errors are possible (they are static-check only and do not forbid compliation and working)