Back to Explore

pmndrs/zustand

GitHub
3 updates · last 90 daysOpen source

Last release:

Zustand is a small, fast, scalable state-management solution for React, built around hooks. It lets you create a store hook and bind components to selected state so components re-render on state changes, without needing context providers or much boilerplate. It also provides utilities for non-reactive access and subscriptions for reacting to state updates outside components.

Project status

  • Actively maintained, with an upstream push and update on 2026-10-22, just before today.
  • Updates have been fairly frequent in 2026, with several v5 patch updates since January, often spaced weeks to a couple of months apart.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v5.1.0

    v5.1.0 adds PromiseLike support to persist storage reads, migrations, and migration writes, and makes persist.rehydrate() return a native Promise<void>. It also adds Redux DevTools action dispatching through the new actionCreators option, including nested action paths and arguments.

    Features
  • v5.0.16

    Zustand v5.0.16 includes a React performance improvement and fixes for DevTools serialization, shared-connection cleanup, and persisted stores preserving externally supplied action arguments. No public API breaking changes are apparent in the implementation diff.

  • v5.0.15

    v5.0.15 contains two targeted bug fixes: improving devtools caller-name inference from V8 stacks (notably when source paths include spaces), and fixing persist.clearStorage behavior to invalidate concurrent async rehydrations. The diff also shows additional, related behavioral adjustments and several development dependency bumps that are not mentioned in the release notes.

  • v5.0.14

    v5.0.14 primarily addresses a TypeScript typing issue in the devtools middleware, improving type inference for the Devtools initializer. In addition, this release includes various internal and documentation updates plus CI and dependency maintenance changes.

  • v5.0.13

    v5.0.13 focuses on improving the devtools middleware, specifically how it extracts the caller name from error stacks. It also includes repository-wide dependency and tooling updates plus additional test coverage for devtools stack parsing.

  • v5.0.12

    v5.0.12 release notes document two targeted bug fixes: a persist middleware rehydration callback change and a devtools Redux config type extension fix. However, the provided diff for this release is dominated by documentation site restructuring (new /learn and /reference paths, renames, and README link updates) plus CI workflow action version pinning. No runtime/API changes are visible in the provided diff snippets, but there are significant undocumented documentation and tooling changes.

    Security
  • v5.0.11

    v5.0.11 focuses on middleware improvements: better TypeScript typing for devtools and immer, plus a persist fix to avoid relying on a global localStorage. The code diff also includes various tooling and dependency bumps (build, eslint, React/Vitest tooling) that are not mentioned in the release notes.

  • v5.0.10

    v5.0.10 includes a fix to the zustand `persist` middleware aimed at preventing a race condition when multiple `rehydrate()` calls run concurrently. The code change introduces a hydration versioning mechanism so that stale, in-flight hydration work does not overwrite newer hydration results.

  • v5.0.9

    v5.0.9 primarily introduces an experimental SSR-safe middleware exported as `unstable_ssrSafe`, intended for Next.js usage. The code also updates documentation, examples, tests, and CI configuration, but the only runtime library source change is the new middleware export and implementation.

    Features
  • v5.0.8

    v5.0.8 includes a bug fix for `shallow` equality when comparing `Map` entries involving `undefined`, and a change to the `persist` middleware to return the storage result/promise from `setState`. The code diff also shows several TypeScript API type adjustments in `persist.ts` and `createJSONStorage`, which are not described in the release notes.

    Features
  • v5.0.7

    v5.0.7 is a small patch release focused on a React hook optimization. The only runtime-code change shown is in the React integration, where the snapshot selector functions passed to React's useSyncExternalStore are now memoized with useCallback.

  • v5.0.6

    v5.0.6 includes a middleware export refactor and a devtools behavior tweak related to how action types are derived. The diff also shows a variety of non-runtime updates, including documentation and test adjustments, plus development dependency bumps.

  • v5.0.5

    Release v5.0.5 is presented as a set of small improvements, including a shallow-compare update, addition of a devtools cleanup method, a refactor in createJSONStorage, and better devtools action type inference. The provided code diff snippet mostly shows repository tooling, workflows, and documentation changes rather than the Zustand runtime source for those specific PRs.

    Features