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

reactjs-statify

v1.0.3

Published

Statify: A simple global state management solution for React.js

Readme

ReactJS Statify

Statify is a simple and lightweight global state management solution for React.js applications. It leverages the concept of atoms to manage state in a modular and type-safe manner.

Features

  • Global State Management: Easily manage and access state across your entire React application.
  • TypeScript Support: Strongly typed with TypeScript for better developer experience.
  • Event-Driven Updates: Efficient state updates using event listeners.
  • Immutable State: Ensures state immutability to prevent unintended side effects.
  • Lightweight: Minimal setup with no boilerplate.

Installation

npm install reactjs-statify
# or
yarn add reactjs-statify

Getting Started

Here's an example of how to use reactjs-statify in your application:

1. Create Atom

Atoms are the building blocks of your application's state. Here's how to define an atom for a counter:

import { createAtom } from 'reactjs-statify';

export const countAtom = createAtom<'count', { countValue: { value: number } }>(
  'count',
  { countValue: { value: 0 } }
);

2. Use Atom in Components

You can access and update the atom's state in your React components using useAtomSelector and set methods.

import { countAtom } from './state-management/count';

export default function Hello({ name }: { name: string }) {
  const count = useAtomSelector({ atom: countAtom, props: 'countValue.value' });

  const handleOnIncrease = () => {
    countAtom.set('countValue.value', (prev) => prev + 1);
  };

  const handleOnReset = () => {
    countAtom.set('countValue.value', 0);
  };

  return (
    <>
      <button onClick={handleOnIncrease}>{count}</button>
      <button onClick={handleOnReset}>RESET</button>
    </>
  );
}

3. Benefits of Using ReactJS Statify

  • Simple API: Minimal learning curve for developers familiar with React.
  • Scalability: Easily scale your state management as your application grows.
  • Integration: Works seamlessly with existing React and TypeScript projects.

API Reference

createAtom

Creates an atom for managing a specific piece of state.

Syntax:

createAtom<Name, State>(name: Name, initialState: State)

Parameters:

  • name: A unique identifier for the atom.
  • initialState: The initial state of the atom.

useAtomSelector

Selects a specific part of an atom's state for use in a component.

Syntax:

useAtomSelector({ atom, props })

Parameters:

  • atom: The atom you want to access.
  • props: The specific property or path in the atom's state you want to use.

atom.set

Updates the state of an atom.

Syntax:

atom.set(path, updater)

Parameters:

  • path: The specific path in the state you want to update.
  • updater: A new value or a function that returns the new value.

License

ReactJS Statify is open-source and available under the MIT License.