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

hank-zilla

v3.0.3

Published

A lightweight React state management library with modular architecture

Downloads

439

Readme

🦖 Hank-Zilla

Global React state with the ergonomics of useState — no Provider, no boilerplate, no dependencies.

npm version License: MIT TypeScript

Features

  • No Provider — read and write the same state from any component
  • FamiliaruseAppState reads like useState, but global
  • Tiny — zero dependencies, ~0.7 KB gzipped
  • Correct — built on useSyncExternalStore, concurrent-safe
  • Typed — full TypeScript inference

Install

npm install hank-zilla

Quick start

useAppState returns the value and subscribes to it. Write with setAppState from anywhere — no props, no context.

import { useAppState, setAppState } from 'hank-zilla'

function Counter() {
    const count = useAppState('count', 0)
    return <button onClick={() => setAppState('count', (n) => n + 1)}>{count}</button>
}

// Another component, same state — nothing passed down
function Readout() {
    const count = useAppState('count')
    return <p>Count is {count}</p>
}

API

useAppState<T>(key, defaultValue?, removeOnUnmount?, silent?) → T

Subscribe to a key and get its current value. Re-renders only when that key changes.

const count = useAppState('count', 0)
const user = useAppState<User>('user', null)
const temp = useAppState('draft', '', true) // removed from the store on unmount

setAppState(key, value | updater, silent?)

Write a key from anywhere. A plain value replaces; a function is an updater (prev) => next.

setAppState('count', 42) // replace
setAppState('count', (n) => n + 1) // updater
setAppState('user', { name: 'Jane' }) // replaces the whole value
setAppState('user', (u) => ({ ...u, name: 'Jane' })) // merge — via updater
setAppState('items', (list) => [...list, item]) // append — via updater

Each key is independent: writing count never touches user. Pass silent to update without notifying subscribers.

getAppState(key?)

Read without subscribing — no re-render. Handy in callbacks and utilities.

getAppState('count') // one key
getAppState() // the whole store

deleteAppState(key)

Remove a key and re-render its subscribers (they fall back to their default).

$getAppState() — console helper

Exposed on globalThis for debugging in the browser console.

$getAppState() // the whole store
$getAppState('count') // one key

Comparison

| | Hank-Zilla | Context API | Redux | Zustand | | --- | --- | --- | --- | --- | | Provider needed | No | Yes | Yes | No | | Boilerplate | None | Some | High | Low | | Global access | Yes | Provider scope | Yes | Yes | | Bundle (gzip) | ~0.7 KB | built-in | large | ~1 KB | | TypeScript | Full | Manual | Full | Full |

Migration

// Local state
const [count, setCount] = useState(0)
setCount((n) => n + 1)

// Global state
const count = useAppState('count', 0)
setAppState('count', (n) => n + 1)

License

MIT — see LICENSE.

Built by phamdung2209 🦖