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

jsxstate

v1.0.0-rc.1

Published

Declarative UIs for declarative XState machines

Readme

Declarative UIs for declarative XState machines

NPM JavaScript Style Guide Travis


jsxstate - Motivation

The main idea of the library is to provide an easy way to write React UIs based on XState machines using components only (or mainly). Instead of writing imperactive coding, creating functions to trigger events or creating complex hooks, you can focus in writing components that communicate with your machine, render desired data when a machine state matches and stuffs like that.


Playground

Try it out on the playground - https://marceloadsj.github.io/jsxstate/


Install

npm install jsxstate
# or
yarn add jsxstate

Peer dependencies: react xstate @xstate/react


APIs

You can find each API individually below:

Interpret - How to start a machine and provide it on React context

Value - How to render the finite or infinite state of a machine

Send - How to trigger events on a machine

Matches - How to render components based on a finite or infinite state

Hooks:

useContextMachine - How to access the machines on the context

useMatches - How to get booleans based on finite or infinite state

useSend - How to get triggers to send events to the machine

useValue - How to access machine finite or infinite states

Internals

Those are not exported, but you can read how they works under the hood

MachineContext - How React context works inside the library


Roadmap

Version 1

  • [x] Simple playground with editor and real time result
  • [x] Basic components (Interpret, Value, Send, Matches)
  • [x] Tests for all components
  • [x] Documentation for all components
  • [x] Targeting machines by configurable id/machineId on components
  • [x] Basic hooks (useContextMachine, useValue, useSend, useMatches)
  • [ ] Tests for all hooks
  • [x] Documentation for all hooks
  • [x] Targeting machines by configurable id/machineId on hooks
  • [x] Everything written in Typescript (appart of the example/playground)

License

MIT © marceloadsj