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

stipula

v0.0.0

Published

**Stipula, cute react state management** 🐱

Downloads

4

Readme

Stipula 🌟

Stipula, cute react state management 🐱

Stipula is a simple React state management library that uses observables to manage state. It is designed to be lightweight and easy to use, making state management in React applications a breeze. 🚀

Features ✨

  • Lightweight: Minimal footprint, easy to integrate.
  • Observable-based: Uses observables for state management.
  • React Integration: Seamless integration with React through hooks.
  • Efficient Re-renders: Provides a Memo component for efficient re-renders.
  • TypeScript Support: Fully typed for better developer experience.
  • Simple API: Easy-to-use API for managing state.

Installation 📦

To install Stipula, use npm:

npm install stipula

Usage 💡

Simple usage outside React

Stipula can be used outside of React to manage state with observables.

import { createAtom } from 'stipula';

const atom = createAtom({ count: 0 });

const unsubscribe = atom.subscribe((state) => {
  console.log(state);
});

atom.set({ count: atom.get().count + 1 });
atom.set({ count: atom.get().count + 1 });
atom.set({ count: atom.get().count + 1 });

unsubscribe();

Usage with React (useAtom) ⚛️

Stipula integrates seamlessly with React through the useAtom hook.

import React from 'react';
import { createAtom, useAtom } from 'stipula';

const atom = createAtom(0);

const Counter = () => {
  const [count, setCount] = useAtom(atom);

  return (
    <div>
      <h1>{count}</h1>
      <button onClick={() => setCount(count + 1)}>Increment</button>
    </div>
  );
}

Usage with Memo 📝

Stipula also provides a Memo component for efficient re-renders based on state changes.

import React from 'react';
import { createAtom, Memo } from 'stipula';

const atom = createAtom(0);

const Counter = () => {
  return (
    <div>
      <h1><Memo atom={atom}>{(count) => count}</Memo></h1>
      <button onClick={() => atom.set(atom.get() + 1)}>Increment</button>
    </div>
  );
}

API 📚

createAtom(initialState)

Creates a new atom with the given initial state.

  • initialState: The initial state of the atom.

useAtom(atom)

A React hook that subscribes to the given atom and returns the current state and a setter function.

  • atom: The atom to subscribe to.

Memo

A React component that subscribes to an atom and renders its children with the current state.

  • atom: The atom to subscribe to.
  • children: A function that receives the current state and returns a React element.

License

Stipula is licensed under the MIT License.