OSS Tanbou

manage React state with provider-free hook stores and subscribe through selectors

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
58,774
Primary language
TypeScript
License
MIT
Repository last updated
Sep 29, 2026
On this page

Overview

Zustand is a small state-management library for React. create builds a store hook, components select only the state they need, and optional middleware adds persistence, devtools integration, selector subscriptions, and other behavior.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Create stores as hooks without a required provider

Passing state and actions to create returns a store hook that components can call directly. Basic usage does not require wrapping the application in a Context Provider.

Sources: [2]

Use selectors and middleware to control subscriptions and behavior

Selectors subscribe components to specific state slices, while useShallow can reduce rerenders for grouped selections. Middleware includes persistence, devtools, and selector-aware subscriptions.

Sources: [2]

Best fit

Fits React applications that need concise shared client state

It works well for shared form state, cross-screen UI state, and client-side application state when teams want less boilerplate than reducer-heavy approaches. A vanilla store is also available without React.

Sources: [2]

Before adoption

Replacing the whole state can also remove actions

Passing true as the second argument to set replaces rather than merges the state, which can remove action functions stored alongside data. Whole-state replacement needs deliberate preservation of required fields.

Sources: [2]

Avoid sharing module-level stores across React Server Component requests

The README warns that adding shared state through this pattern in React Server Components can cause unexpected behavior and privacy issues. Server-rendered applications need request-aware store boundaries.

Sources: [2]

Official sources

  1. [1]pmndrs/zustand repository(2026-09-30)
  2. [2]Zustand README(2026-09-30)
  3. [3]Zustand package metadata(2026-09-30)
  4. [4]Zustand MIT license(2026-09-30)
Supplemental curator note

It starts with very little ceremony, but selector design and store boundaries directly affect rerenders and SSR/RSC safety. Server Components require careful request isolation instead of a shared module-level store.

Try it in 3 steps

  1. 1

    Install Zustand

    Add Zustand to an existing React project using the command documented in the README.

    npm install zustand
  2. 2

    Create a store hook

    After importing create from zustand, define a minimal store with state and an action.

    const useBearStore = create((set) => ({ bears: 0, increase: () => set((state) => ({ bears: state.bears + 1 })) }))
  3. 3

    Subscribe to only the state a component needs

    Use a selector for the required value and read actions from the same store hook when wiring UI interactions.

    const bears = useBearStore((state) => state.bears)
Check the official README

Growth

Growth trends · Last 30 days

58,774 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
1
Open PRs
5

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • hooks
  • react
  • react-context
  • reactjs
  • redux
  • state-management
  • hacktoberfest
Stars
58,774
Forks
2,192
Watchers
202
Open issues
2
Contributors
337
Owner type
Organization
Primary language
TypeScript
License
MIT
Repository last updated
Sep 29, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?