# Zustand

MIT\-licensed state\-management library with hook\-based React stores, selectors and optional persistence middleware\.

ID: Q65 · Revision: 1477

Type: software · License: MIT[^license] · Status: active

Website: https://zustand.docs.pmnd.rs



Zustand is an open\-source state\-management library with a hook\-based React API\. A store contains values and update actions, and components subscribe to selected state\. Optional middleware adds persistence\. The compact interface can suit custom application state, but it does not remove the need to design immutable updates, server\-rendering boundaries or stored\-data migrations\.[^readme][^persist]

## Capabilities and substitutions

### Selected React store subscriptions — supported

Components use a hook to select state; reading the entire store updates on every change\.[^readme]

Use case: Shared client application state and selected persisted state · Platforms: React applications, JavaScript stores with appropriate integrations · Region: Version, build and integration requirements apply

### Automatic deep merging — unsupported

set merges one level only; nested structures need explicit immutable updates or helper logic\.[^merge]

Use case: Shared client application state and selected persisted state · Platforms: React applications, JavaScript stores with appropriate integrations · Region: Version, build and integration requirements apply

### Persistence and migration controls — supported

Middleware can choose fields/storage, version stored data and migrate old representations\.[^persist]

Use case: Shared client application state and selected persisted state · Platforms: React applications, JavaScript stores with appropriate integrations · Region: Version, build and integration requirements apply

### Hydrated values available immediately — limited

Asynchronous storage hydrates later than the initial render; applications must account for that state\.[^persist]

Use case: Shared client application state and selected persisted state · Platforms: React applications, JavaScript stores with appropriate integrations · Region: Version, build and integration requirements apply

### Shared global store for SSR requests — unsupported

The Next\.js guidance explicitly requires per\-request isolation and no RSC store reads/writes\.[^next]

Use case: Shared client application state and selected persisted state · Platforms: React applications, JavaScript stores with appropriate integrations · Region: Version, build and integration requirements apply

### [Substitute for Redux Toolkit](/reduxtoolkit) — limited

Can replace Redux Toolkit for suitable shared React client\-state workflows after rewriting actions, selectors and store organization\. This does not reproduce Redux middleware contracts or optional RTK Query caching automatically\.[^readme][^merge][^redux]

Use case: Shared client application state and selected persisted state · Platforms: React applications, JavaScript stores with appropriate integrations · Region: Version, build and integration requirements apply

### [Substitute for Jotai](/jotai) — limited

Can replace Jotai for shared React client state when an object store with explicit actions and selectors suits the application\. Reimplement atom dependencies and update logic, and preserve per\-subtree store lifetimes where needed\. This is a change of state model rather than compatible atom APIs\.[^state-comparison][^jotai-comparison][^jotai-provider]

Use case: Shared React client state organized in object stores · Platforms: React applications · Region: Version and framework configuration apply

## References

[^license]: [Zustand license](<https://github.com/pmndrs/zustand/blob/main/LICENSE>) — MIT terms (vendor; retrieved 2026-10-07T23:17:41Z)

[^readme]: [Zustand overview](<https://github.com/pmndrs/zustand/blob/main/README.md>) — Hook stores, selectors and immutable updates (vendor; retrieved 2026-10-07T23:17:14Z)

[^merge]: [Zustand immutable state and merging](<https://github.com/pmndrs/zustand/blob/main/docs/learn/guides/immutable-state-and-merging.md>) — One\-level merge and replacement flag (vendor; retrieved 2026-10-07T23:18:05Z)

[^migration]: [Zustand v5 migration](<https://github.com/pmndrs/zustand/blob/main/docs/reference/migrations/migrating-to-v5.md>) — React minimum, stable selector outputs and persistence changes (vendor; retrieved 2026-10-07T23:18:05Z)

[^persist]: [Zustand persistence](<https://github.com/pmndrs/zustand/blob/main/docs/reference/integrations/persisting-store-data.md>) — partialize, version/migrate, shallow merge and asynchronous hydration (vendor; retrieved 2026-10-07T23:18:05Z)

[^next]: [Zustand Next\.js guide](<https://github.com/pmndrs/zustand/blob/main/docs/learn/guides/nextjs.md>) — Per\-request stores, matching hydration and RSC boundaries (vendor; retrieved 2026-10-07T23:17:41Z)

[^redux]: [Redux Toolkit overview](<https://redux.js.org/toolkit/introduction/getting-started>) — Slices, store setup and optional RTK Query (vendor; retrieved 2026-10-07T23:17:02Z)

[^state-comparison]: [Zustand comparison with Jotai](<https://zustand.docs.pmnd.rs/learn/getting-started/comparison.html>) — Jotai state model and selector versus atom\-dependency subscriptions (vendor; retrieved 2026-10-09T03:49:00Z)

[^jotai-comparison]: [Jotai comparison with Zustand](<https://jotai.org/docs/basics/comparison>) — Store organization, module/context scope and choosing between state models (vendor; retrieved 2026-10-09T03:49:00Z)

[^jotai-provider]: [Jotai Provider and store scope](<https://jotai.org/docs/core/provider>) — Independent subtree values and Provider remount behavior (vendor; retrieved 2026-10-09T03:49:00Z)

[^source-11]: [https://zustand\.docs\.pmnd\.rs/learn/getting\-started/comparison\.html](<https://zustand.docs.pmnd.rs/learn/getting-started/comparison.html>) — Jotai comparison: object\-store state model and selector\-based subscriptions\. (assessment; retrieved 2026-10-09T03:49:51.529Z)

Source revision: https://substitutefor.net/entities/Q65?revision=1477
