NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1246 most downloaded on npm
🐻 Bear necessities for state management in React
Last release 1 months ago
13 Aug 2026
Ships fairly regularly
a new release about every 6 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
158 releases · first in 2019
Fix some issues in devtools and persist middleware.
Fix some issues in devtools and persist middleware.
Full Changelog: v5.0.14...v5.0.15
This release fixes a type issue in devtools.
This release fixes a type issue in devtools.
Full Changelog: v5.0.13...v5.0.14
One column per quarter.
This release includes an improvement in the devtools middleware.
This release includes an improvement in the devtools middleware.
Full Changelog: v5.0.12...v5.0.13
fix(persist): use latest state in post-rehydration callback by @Shohjahon-n in #3391
Two small fixes.
Full Changelog: v5.0.11...v5.0.12
This release includes small improvements in middleware thanks to contributors.
This release includes small improvements in middleware thanks to contributors.
Full Changelog: v5.0.10...v5.0.11
This version includes a fix to the persist middleware for an edge case.
This version includes a fix to the persist middleware for an edge case.
Full Changelog: v5.0.9...v5.0.10
This includes experimental middleware unstable_ssrSafe for a new usage with Next.js. Related discussion: #2740
This includes experimental middleware unstable_ssrSafe for a new usage with Next.js.
Related discussion: #2740
Full Changelog: v5.0.8...v5.0.9
A bug fix in shallow and a tiny improvement in persist .
A bug fix in shallow and a tiny improvement in persist.
Full Changelog: v5.0.7...v5.0.8
This enables a small optimization in some edge cases.
This enables a small optimization in some edge cases.
Full Changelog: v5.0.6...v5.0.7
fix(devtools): Avoid inferring action type when explicit action name is provided by @vchirikov in #3147
Some very minor changes.
Full Changelog: v5.0.5...v5.0.6
It comes with some small improvements.
It comes with some small improvements.
Full Changelog: https://github.com/pmndrs/zustand/compare/v5.0.4...v5.0.5
This fixes module resolution issue for React Native users.
This fixes module resolution issue for React Native users.
Full Changelog: https://github.com/pmndrs/zustand/compare/v5.0.3...v5.0.4
ExtractState is a type util to extract state type from store type.
ExtractState is a type util to extract state type from store type.
Full Changelog: https://github.com/pmndrs/zustand/compare/v5.0.2...v5.0.3
This fixes some issues in middleware.
This fixes some issues in middleware.
Full Changelog: https://github.com/pmndrs/zustand/compare/v5.0.1...v5.0.2
This fixes shallow function for some edge cases.
This fixes shallow function for some edge cases.
Full Changelog: https://github.com/pmndrs/zustand/compare/v5.0.0...v5.0.1
Other small improvements (technically breaking changes)
createWithEqualityFn and useStoreWithEqualityFn in zustand/traditional)Read the migration guide carefully: https://github.com/pmndrs/zustand/blob/main/docs/migrations/migrating-to-v5.md
During the RC period, some users encountered the following infinite loop error:
Uncaught Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
This case was already a non-ideal behavior in v4 but appears more explicitly as an error in v5. While there are several ways to resolve this, using useShallow often fixes the problem.
setState by @chrisvander in https://github.com/pmndrs/zustand/pull/2696Full Changelog: https://github.com/pmndrs/zustand/compare/v4.5.5...v5.0.0
Hopefully, this will be the last RC, unless we have serious bug reports in #2741.
Hopefully, this will be the last RC, unless we have serious bug reports in #2741.
Full Changelog: https://github.com/pmndrs/zustand/compare/v5.0.0-rc.1...v5.0.0-rc.2
This version includes some minor changes. Please report any issues if you find.
This version includes some minor changes. Please report any issues if you find.
setState by @chrisvander in https://github.com/pmndrs/zustand/pull/2696Full Changelog: https://github.com/pmndrs/zustand/compare/v5.0.0-rc.0...v5.0.0-rc.1
Please see the migration guide and share your feedback.
Please see the migration guide and share your feedback.
<img width="791" alt="image" src="https://github.com/user-attachments/assets/b1d6175f-2017-49f1-ab43-09470a82417b">
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.5.5...v5.0.0-rc.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
See: https://github.com/pmndrs/zustand/pull/3087#issuecomment-2876726564
See: https://github.com/pmndrs/zustand/pull/3087#issuecomment-2876726564
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.5.6...4.5.7
See: #2943 Full Changelog: https://github.com/pmndrs/zustand/compare/v4.5.5...v4.5.6
See: #2943
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.5.5...v4.5.6
:warning: We thought this was fixing a bug, but it actually introduced a behavioral breaking change. Please use v4.5.4 if the change is troublesome. S…
This improves the persist middleware behavior for an edge case.
:warning: We thought this was fixing a bug, but it actually introduced a behavioral breaking change. Please use v4.5.4 if the change is troublesome. See: #2763
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.5.4...v4.5.5
There was an issue in v4.5.3 with some bundlers.
There was an issue in v4.5.3 with some bundlers.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.5.3...v4.5.4
It comes with a minor fix in types, but also some changes in configs.
It comes with a minor fix in types, but also some changes in configs.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.5.2...v4.5.3
It should improve the compatibility with old browsers.
It should improve the compatibility with old browsers.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.5.1...v4.5.2
People might have misunderstood with useStore deprecation message. Hope this mitigates it.
People might have misunderstood with useStore deprecation message. Hope this mitigates it.
persist middleware by @rafaeelaudibert in https://github.com/pmndrs/zustand/pull/2332Full Changelog: https://github.com/pmndrs/zustand/compare/v4.5.0...v4.5.1
fix: Add deprecation notice for getServerState() in WithReact type by @charkour in https://github.com/pmndrs/zustand/pull/2266
This version adds a new capability for SSR/Hydration.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.4.7...v4.5.0
There's a small fix for a use case with an non-object value in store.
There's a small fix for a use case with an non-object value in store.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.4.6...v4.4.7
v4.4.5 has an issue with some TypeScript configs about module resolution. It should be fixed now. Thanks for the patience.
v4.4.5 has an issue with some TypeScript configs about module resolution. It should be fixed now. Thanks for the patience.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.4.5...v4.4.6
Hopefully, it should fix some issues with Node.js environment including Next.js.
Hopefully, it should fix some issues with Node.js environment including Next.js.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.4.4...v4.4.5
There was a tiny issue in v4.4.3, which broke with some bundlers, which this version fixes.
There was a tiny issue in v4.4.3, which broke with some bundlers, which this version fixes.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.4.3...v4.4.4
The changes in v4.4.2 were troublesome for some users. This version should fix/mitigate such cases.
The changes in v4.4.2 were troublesome for some users. This version should fix/mitigate such cases.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.4.2...v4.4.3
This adds useShallow hook to cover some use cases that are deprecated with v4.4.0 change. Check out the guide.
This adds useShallow hook to cover some use cases that are deprecated with v4.4.0 change. Check out the guide.
#1991 requires something like below if you are using the devtools middleware and TypeScript.
import { devtools } from 'zustand/middleware'
+ import type {} from '@redux-devtools/extension'
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.4.1...v4.4.2
Fixes some issues reported with the deprecated feature in v4.4.0.
Fixes some issues reported with the deprecated feature in v4.4.0.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.4.0...v4.4.1
This adds new zustand/traditional entry point and deprecates equalityFn from zustand.
This adds new zustand/traditional entry point and deprecates equalityFn from zustand.
If you don't use custom equalityFn, nothing is required.
For those who use custom equalityFn such as shallow:
// previously
import { create } from 'zustand'
const useFooStore = create((set) => ...)
// now
import { createWithEqualityFn } from 'zustand/traditional'
const useFooStore = createWithEqualityFn((set) => ..., Object.is)
// Object.is is the default quailtyFn in zustand create; to match that behavior, pass that function here. This can be updated to shallow or anything else
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.9...v4.4.0
This includes a small improvement for production build mostly for Vite users. Docs have been improved too!
This includes a small improvement for production build mostly for Vite users. Docs have been improved too!
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.8...v4.3.9
For persist middleware, a new option for createJSONStorage in introduced to support more cases. Note that createJSONStorage isn't a required function
For persist middleware, a new option for createJSONStorage in introduced to support more cases. Note that createJSONStorage isn't a required function (and it's not very recommended as it's not type safe), and one should create a custom storage for more use cases.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.7...v4.3.8
This includes a couple of improvements in persist middleware.
This includes a couple of improvements in persist middleware.
persist does not drop updates in onRehydrateStorage when using a synchronous storage API by @coffeebeats in https://github.com/pmndrs/zustand/pull/1689onRehydrateStorage and onHydrate is defined on first hydration by @coffeebeats in https://github.com/pmndrs/zustand/pull/1692Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.6...v4.3.7
This has a little improvement for library authors.
This has a little improvement for library authors.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.5...v4.3.6
v4.3.4 has a regression in CJS build. Please use this version instead.
v4.3.4 has a regression in CJS build. Please use this version instead.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.4...v4.3.5
This version fixes some build configs for some edge cases.
This version fixes some build configs for some edge cases.
⚠️ this version has an issue in CJS build. Please use v4.3.5.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.3...v4.3.4
fix(log): deprecated messages copyedit for consistency by @jareha in https://github.com/pmndrs/zustand/pull/1588
This version includes some small fixes and internal improvements.
__DEV__ with ts-jest by @dai-shi in https://github.com/pmndrs/zustand/pull/1598Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.2...v4.3.3
There was a regression with default export (which is deprecated) in v4.3.0 and v4.3.1. This should fix it.
There was a regression with default export (which is deprecated) in v4.3.0 and v4.3.1. This should fix it.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.1...v4.3.2
chore: show deprecated message only in DEV by @dai-shi in https://github.com/pmndrs/zustand/pull/1523
This version supersedes v4.3.0.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.3.0...v4.3.1
One of our goal is to provide smallest possible APIs. To go further, this version deprecates some features. They are still usable (with warnings), but…
Throughout past years of development, we've learned the (mis)usage of the library. One of our goal is to provide smallest possible APIs. To go further, this version deprecates some features. They are still usable (with warnings), but will be removed in the future.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.2.0...v4.3.0
This version adds some new features in middleware.
This version adds some new features in middleware.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.1.5...v4.2.0
This version has several small improvements.
This version has several small improvements.
module.exports addition for named and default exports in CJS by @barelyhuman in https://github.com/pmndrs/zustand/pull/1460Full Changelog: https://github.com/pmndrs/zustand/compare/v4.1.4...v4.1.5
This should improve some importing problems. Uncertain if it fixes everything.
This should improve some importing problems. Uncertain if it fixes everything.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.1.3...v4.1.4
This improves store types for TS users. We also upgrade rollup. Please report issues if anyone finds any.
This improves store types for TS users. We also upgrade rollup. Please report issues if anyone finds any.
getState and setState will always exist on the store by @devanshj in https://github.com/pmndrs/zustand/pull/1371StateCreator subtyping by @devanshj in https://github.com/pmndrs/zustand/pull/1373Full Changelog: https://github.com/pmndrs/zustand/compare/v4.1.2...v4.1.3
This includes some fixes for edge cases. Most notably, supporting old TypeScript versions.
This includes some fixes for edge cases. Most notably, supporting old TypeScript versions.
useStoreApi by @exuanbo in https://github.com/pmndrs/zustand/pull/1258TakeTwo, SkipTwo and Mutate to make them work for older ts versions too by @devanshj in https://github.com/pmndrs/zustand/pull/1348Full Changelog: https://github.com/pmndrs/zustand/compare/v4.1.1...v4.1.2
Your coding agent can read these notes before it upgrades. Set up the MCP server →