pmndrs/zustand
π» Bear necessities for state management in React
Build with Backblaze B2
SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.
Loading star history...
Where it stands
Rank, growth pace and release cadence relative to everything GStars tracks.
Ranks #247 of 2,841 repositories GStars tracks this week (top 9%).
1 release in the last 90 days, the latest 53 days ago, with 337 contributors on GitHub.
Use Cases & Benefits
- Provides a small, fast, and scalable state management solution for React using simplified flux principles and hooks.
- Offers a minimal API without boilerplate or context providers, ensuring efficient re-renders and solving common React state pitfalls.
- Use for managing global state in React apps without wrapping components in context providers or adding boilerplate.
- Use for building type-safe, scalable state stores with TypeScript support and middleware like persistence and immer.
- Use for integrating state management outside React components with vanilla stores and subscribing to state changes directly.
Should you depend on it?
License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.
License
MIT
Permissive: commercial use, modification and redistribution are allowed with attribution.
Community files
- README: present
- Contributing guide: present
Watch-outs
No watch-outs from GStars' checks.
General guidance from repository metadata, not legal advice. How we score
From the README
A small, fast and scalable bearbones state-management solution using simplified flux principles. Has a comfy API based on hooks, isn't boilerplatey or opinionated.
Don't disregard it because it's cute. It has quite the claws, lots of time was spent dealing with common pitfalls, like the dreaded zombie child problem, react concurrency, and context loss between mixed renderers. It may be the one state-manager in the React space that gets all of these right.
You can try a live demo and read the docs.
:warning: This readme is written for JavaScript users. If you are a TypeScript user, be sure to check out our TypeScript Usage section.
Your store is a hook! You can put anything in it: primitives, objects, functions. State has to be updated immutably and the
setfunction merges state to help it.Use the hook anywhere, no providers are needed. Select your state and the component will re-render on changes.
Daily snapshots
Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots
Forks
2.2K-59
Open issues
7+3
Compared with peers in Frontend
Fastest-growing repositories GStars tracks in this cohort for the week of Oct 4, by 7-day star growth
| Repository | Stars | +7d | Health | Last release |
|---|---|---|---|---|
| DuarteSantos8/openGym | 11.1K | +7.1K | 60 | 3 days ago |
| heygen-com/hyperframes | 62.8K | +4.0K | 45 | today |
| Leonxlnx/taste-skill | 94.5K | +2.2K | 75 | β |
| vercel/next.js | 143.2K | +416 | 75 | today |
| Open-Dev-Society/OpenStock | 20.2K | +366 | 75 | β |
| pmndrs/zustand | 58.8K | +0 | 75 | 53 days ago |
| Category median | 62.8K | +2.2K | 75 | β |
Also by pmndrs
Other repositories from this maintainer that GStars tracks
Discover Repositories
Search across tracked repositories by name or description