
Zustand
Small state-management library whose store is a hook, used in React and usable without React.
zustand.docs.pmnd.rs/repositorydocsplugins
Zustand is a state-management library in which the store is a hook. Components select the part of the state they read and re-render only when that part changes, and no provider has to wrap the app. A store is created with a single create call, and code outside components can read and write it through getState and setState. Middleware adds persistence, Immer-based updates, Redux devtools logging and a Redux-style reducer pattern. The core imports and runs without React, and the documentation describes sharing a store with React Native and other non-React code.
Worth knowing
Middleware that changes set or get does not apply to getState and setState. The README advises against that outside-component technique in React Server Components. Setting state merges by default; the replace flag swaps in a new state model instead, which can wipe parts such as actions. A component that reads the whole store with no selector re-renders on every change.
Identity
Rendering and deploy
- Install with
- npm, yarn, pnpm, bun, deno1
Releases
Adoption
Sources
- 2026-11-17: links, Built on, Install with
zustand.docs.pmnd.rs/ - 2026-11-17: links, Written in, License, GitHub stars
api.github.com/repos/pmndrs/zustand - 2026-11-17: links, Categories
github.com/pmndrs/zustand/blob/main/README.md - 2026-11-17: Maintainer, License model
github.com/pmndrs/zustand/blob/main/LICENSE - 2026-11-17: First release
registry.npmjs.org/zustand - 2026-11-17: Current major version, Last release
github.com/pmndrs/zustand/releases/tag/v5.1.0 - 2026-11-17: npm downloads a week
api.npmjs.org/downloads/range/2026-11-01:2026-11-07/zustand - 2026-11-17: Contributors
api.github.com/repos/pmndrs/zustand/contributors?per_page=1 - 2026-11-17: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/zustand