substitutefor

software · Q65

Substitutes for Zustand

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

Suggest a correction

Compare your options

Find a substitute for Zustand

Start with what you need to do. Compare the fit, differences, and sources for each option.

2 options

Jotai

Sourced comparison

Shared React client state and derived values limited

Jotai → Zustand

Can replace Zustand for shared React state when composable atoms and dependency-based subscriptions suit the application. Rewrite store reads, update actions and derived state; verify Provider scope and persisted-data handling. This is not API or middleware compatibility and does not imply a measured performance advantage.

Platforms: React applications · Region: Version and framework configuration apply

Sources for this comparison (4)Article revision 885
How Zustand compares as a replacement

Shared React client state organized in object stores limited

Zustand → Jotai

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.

Platforms: React applications · Region: Version and framework configuration apply

Sources for this comparison (3)Article revision 1477

Redux Toolkit

Sourced comparison

Structured shared application state and action-based updates limited

Redux Toolkit → Zustand

Can replace Zustand for shared application state using Redux actions, slice reducers and React Redux subscriptions. Existing store actions and selectors need adaptation; the additional architecture is a tradeoff, not demonstrated universal superiority.

Platforms: JavaScript/TypeScript applications, React through React Redux bindings · Region: Version, build and integration requirements apply

Sources for this comparison (3)Article revision 584
How Zustand compares as a replacement

Shared client application state and selected persisted state limited

Zustand → Redux Toolkit

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.

Platforms: React applications, JavaScript stores with appropriate integrations · Region: Version, build and integration requirements apply

Sources for this comparison (3)Article revision 1477

Overview

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.[2][5]

Store and subscription workflow

A Zustand store can contain state and the actions that update it. React components select the portions they need through a hook, without a provider in the simple client-only pattern. Selecting the entire store broadens the component's subscription. This makes the API concise, but the application still decides ownership, update boundaries and which state belongs outside individual components.[2]

Shallow merging is not deep mutation support

The set function merges at one level. Updating a nested object requires retaining its other fields explicitly, rather than assuming the store recursively merges them. A replacement flag disables merging entirely. For generated code, this distinction is important: a short nested update can discard neighboring fields even though the top-level update appears reasonable. The documented state model remains immutable.[3]

Version 5 selector requirements

The v5 migration guide raises the React minimum to 18 and changes equality handling. Selectors that return fresh references can cause update loops, with useShallow or stable fallback values offered as remedies. Custom equality functions use the separate traditional APIs rather than the basic create function. These are behavioral migration requirements, not just import renames.[4]

Persist only the intended data

Persistence middleware supports several storage backends, field selection through partialize and explicit version migrations. Its default merge is shallow, which can lose newer nested defaults when older partially persisted objects are restored. Asynchronous storage also hydrates after initial rendering, so a default value is not proof that there is no saved value. The application must distinguish loading persisted state from the settled state and decide what data should be retained.[5]

Server rendering changes the simple-store pattern

The Next.js guide warns that module-global stores can be shared across requests and requires a per-request store. It also calls for matching server/client initial data and says React Server Components should not read or write the store. The page notes that further guidance is being developed, so this article retains the explicit isolation boundaries without claiming a universal framework recipe.[6]

License and substitution

Zustand is MIT-licensed. It can replace Redux Toolkit for appropriate shared client-state tasks where its store and selector model fits. Redux reducers, middleware and optional server-data caching are separate migration concerns. No measured bundle advantage, performance ranking or hands-on migration is claimed.[1][2][7]

Choosing an object store instead of atoms

Zustand can substitute for Jotai for shared React client state when an application is easier to organize around an object containing values and update actions. Components can subscribe with selectors rather than composing primitive and derived atoms. This can suit a compact module-level store with explicit operations, while Jotai's atom model may be more natural for independently composed state. Moving an existing application requires translating atom reads, derived values and writes into store logic. Preserve any separate subtree lifetimes deliberately: replacing several scoped Jotai Providers with one global store would change which component instances share state.[8][9][10]

Capabilities & limitations

Selected React store subscriptions

supported

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

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

1 source · check evidence
https://github.com/pmndrs/zustand/blob/main/README.md

Hook stores, selectors and immutable updates

vendor · checked 2026-10-07

Automatic deep merging

unsupported

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

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

1 source · check evidence
https://github.com/pmndrs/zustand/blob/main/docs/learn/guides/immutable-state-and-merging.md

One-level merge and replacement flag

vendor · checked 2026-10-07

Persistence and migration controls

supported

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

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

1 source · check evidence
https://github.com/pmndrs/zustand/blob/main/docs/reference/integrations/persisting-store-data.md

partialize, version/migrate, shallow merge and asynchronous hydration

vendor · checked 2026-10-07

Hydrated values available immediately

limited

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

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

1 source · check evidence
https://github.com/pmndrs/zustand/blob/main/docs/reference/integrations/persisting-store-data.md

partialize, version/migrate, shallow merge and asynchronous hydration

vendor · checked 2026-10-07

Shared global store for SSR requests

unsupported

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

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

1 source · check evidence
https://github.com/pmndrs/zustand/blob/main/docs/learn/guides/nextjs.md

Per-request stores, matching hydration and RSC boundaries

vendor · checked 2026-10-07

References

  1. Zustand license

    MIT terms

    vendor · retrieved 2026-10-07
  2. Zustand overview

    Hook stores, selectors and immutable updates

    vendor · retrieved 2026-10-07
  3. Zustand immutable state and merging

    One-level merge and replacement flag

    vendor · retrieved 2026-10-07
  4. Zustand v5 migration

    React minimum, stable selector outputs and persistence changes

    vendor · retrieved 2026-10-07
  5. Zustand persistence

    partialize, version/migrate, shallow merge and asynchronous hydration

    vendor · retrieved 2026-10-07
  6. Zustand Next.js guide

    Per-request stores, matching hydration and RSC boundaries

    vendor · retrieved 2026-10-07
  7. Redux Toolkit overview

    Slices, store setup and optional RTK Query

    vendor · retrieved 2026-10-07
  8. Zustand comparison with Jotai

    Jotai state model and selector versus atom-dependency subscriptions

    vendor · retrieved 2026-10-09
  9. Jotai comparison with Zustand

    Store organization, module/context scope and choosing between state models

    vendor · retrieved 2026-10-09
  10. Jotai Provider and store scope

    Independent subtree values and Provider remount behavior

    vendor · retrieved 2026-10-09
  11. https://zustand.docs.pmnd.rs/learn/getting-started/comparison.html

    Jotai comparison: object-store state model and selector-based subscriptions.

    assessment · retrieved 2026-10-09

Discussion & disputes

Ask about unclear claims or explain a concern with supporting sources. If you have a specific fix, suggest a correction.

No discussion yet.

Sign in with an active account to join the discussion.

Revision history

Open a revision to read an earlier version of this article.

RevisionTimestampEdit summary
14772026-10-19 08:31:36/* wbeditentity-statements-multiple-properties-update:0||2 */ sf:4e45d28e-d7a1-438d-8e6b-0a8715843be5:v1 | Add a qualified Zustand-to-Jotai substitute connection for shared React client state. Explain why an object store may fit and what atom logic and subtree scopin | attribution: /proposals/4e45d28e-d7a1-438d-8e6b-0a8715843be5
492026-10-08 23:36:50/* wbeditentity-create-item:0| */ sf:2b438e66-2609-4a84-bdf4-a771dfec8fa5:v1 | Adds Zustand with shallow-merge semantics, stable v5 selectors, persisted-state migrations and request-isolated server-rendering guidance. | attribution: /proposals/2b438e66-2609-4a84-bdf4-a771dfec8fa5