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

@priolo/jon

v1.1.0

Published

React manager state with reducers hooks

Downloads

932

Readme

logo

Installation

npm install @priolo/jon

Documentation

Examples

Complete Project

For LLM agents

You don't need to install anything: copy src/lib/store/rvx_juice.ts into the project as-is. It is a single self-contained file (react is the only dependency) exporting createStore and useStore.

A store is created from a "setup" object with 4 sections:

  • state — initial state: plain object (deep-cloned) or a () => state factory
  • mutators — the ONLY way to change state. Synchronous. Return a PARTIAL state object (shallow-merged into the current state); return undefined to skip the update.
  • actions — sync/async side effects and orchestration. They don't return state: they call mutators through the injected store handle.
  • getters — derived/computed values.

Every setup function receives (payload, store) — treat store like this: read store.state, call siblings as store.setX(...).

Rules (this is NOT redux/zustand — common mistakes):

  • Call methods directly on the store, passing ONLY the payload: myStore.setCount(3).
  • Never write store.state directly; only mutators replace state.
  • useStore(store, fn?): fn(state, oldState) => boolean is a re-render PREDICATE, not a selector. useStore always returns the full state.
import { createStore, useStore } from "./rvx_juice"

const counterStore = createStore({
  state: { count: 0, label: "" },
  getters: {
    isEven: (_, store) => store.state.count % 2 == 0,
  },
  mutators: {
    setCount: (count) => ({ count }),      // partial: `label` is untouched
    setLabel: (label) => ({ label }),
  },
  actions: {
    fetchCount: async (url, store) => {
      const res = await fetch(url)
      store.setCount(await res.json())
    },
  },
})

function Counter() {
  const state = useStore(counterStore)
  return <button onClick={() => counterStore.setCount(state.count + 1)}>
    {state.count} — {counterStore.isEven() ? "even" : "odd"}
  </button>
}

Bonus: store actions/mutators are name(payload) => result, which maps 1:1 onto an LLM tool/function declaration — the agent and the UI can then mutate the same reactive state (see src/lib/experimentals/storeToAiTools.ts).


ROADMAP

  • Documentation
  • Involvement of the community
  • Development of plugins to be applied to the library

DEVELOPMENT NOTE

If you use a local hard-link in package.json for testing
npm link <path_app>/node_modules/react
to avoid the "Invalid hook call" error
https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react

example:
npm link ||C:\Users\iorio\Documents\luca\zero\zero-os\web\||node_modules\react

this solution apparently does not work if you use VOLTA in that case you have to delete, in the JON project, inside node_modules the folders:

  • react
  • react-dom