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
In v4.1.0, there are some TypeScript type issues in redux and devtools middleware, which should be fixed.
In v4.1.0, there are some TypeScript type issues in redux and devtools middleware, which should be fixed.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.1.0...v4.1.1
This supports non-object state. It's probably one of the biggest changes in API design throughout the zustand development history. But, probably 99.9%
This supports non-object state. It's probably one of the biggest changes in API design throughout the zustand development history. But, probably 99.9% of users won't use it 😝 .
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.0.0...v4.1.0
One column per quarter.
Some APIs are already deprecated in v3, and they are removed in v4. Please make sure to update to the latest version of v3 before migrating to v4.
v4 API is completely backward compatible, so it's just nothing to update if you are JS users.
One note is v4 depends on use-sync-external-store. There might be some bundling issues. Please report them if you encounter such cases.
To better support types with middleware, v4 TypeScript code is rewritten. Please find docs/typescript.md for more information.
In v3, zustand/context is provided as a workaround.
v4 API exposes createStore and useStore, which are more flexible.
Please read this for usage.
If you are unsure about the usage, open a new discussion.
Counter example: https://codesandbox.io/s/polished-pond-4jn1e2
Some APIs are already deprecated in v3, and they are removed in v4. Please make sure to update to the latest version of v3 before migrating to v4.
enabled option and show devtools warning only if enabled by @Aslemammad in https://github.com/pmndrs/zustand/pull/880Partial typo from persist by @devanshj in https://github.com/pmndrs/zustand/pull/1051Full Changelog: https://github.com/pmndrs/zustand/compare/v3.7.2...v4.0.0
refactor(types): avoid using deprecated types by @dai-shi in https://github.com/pmndrs/zustand/pull/1122
There was still a tiny issue with typing in zustand/shallow, and it's finally fixed.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.0.0-rc.3...v4.0.0-rc.4
v4.0.0-rc.2 has some issues with TypeScript typing which should be fixed in this version.
v4.0.0-rc.2 has some issues with TypeScript typing which should be fixed in this version.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.0.0-rc.2...v4.0.0-rc.3
feat(types): minimize types by deprecating them by @devanshj in https://github.com/pmndrs/zustand/pull/1089
We've made some changes in TypeScript types. We believe what's remaining is basically docs issues. Please feel free to open issues/discussions.
Partial typo from persist by @devanshj in https://github.com/pmndrs/zustand/pull/1051Full Changelog: https://github.com/pmndrs/zustand/compare/v4.0.0-rc.1...v4.0.0-rc.2
This improves some types for TypeScript users. Please read ./docs for TypeScript usage and v4 migration.
This improves some types for TypeScript users. Please read ./docs for TypeScript usage and v4 migration.
Full Changelog: https://github.com/pmndrs/zustand/compare/v4.0.0-rc.0...v4.0.0-rc.1
…types as much as possible. There are some breaking changes in types from v3. Please refer ./docs/typescript.md and ./docs/v4-migration.md.
We started working on #550 at Aug 31 2021. It's been more than 7 months!
Although this release is v4.0.0-rc.0, we treat this as a normal release. While we might make some changes before the final one, the stability of this release should be same as other releases like v3.7.*.
Most notably, this release is backward compatible with the latest v3 API. Some features deprecated in v3 are removed in v4. It's highly recommended to update to latest v3, before upgrading to v4, and check any deprecation messages.
Zustand code in JS is surprisingly small, and its value is actually in TypeScript. Although it is very tricky to support mutation nature of zustand middleware, @devanshj did a great job to support types as much as possible. There are some breaking changes in types from v3. Please refer ./docs/typescript.md and ./docs/v4-migration.md.
As always, feedback is welcome, and even necessary this time because otherwise nothing happens. Please try v4 and open issues and discussions (discussions are preferable if you are not sure which).
enabled option and show devtools warning only if enabled by @Aslemammad in https://github.com/pmndrs/zustand/pull/880Full Changelog: https://github.com/pmndrs/zustand/compare/v3.7.2...v4.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
Nothing published for this version
Nothing published for this version
This fixes an issue in persist for some use cases.
This fixes an issue in persist for some use cases.
Full Changelog: https://github.com/pmndrs/zustand/compare/v3.7.1...v3.7.2
fix(middleware/devtools): deprecate serialize.options by @dai-shi in https://github.com/pmndrs/zustand/pull/828
This fixes a type issue with zustand/context in v3.7.0.
UseContextStore by @devanshj in https://github.com/pmndrs/zustand/pull/817Full Changelog: https://github.com/pmndrs/zustand/compare/v3.7.0...v3.7.1
This release is to prepare for v4 release, which will include some breaking changes. Especially typing store with middleware will be changed. This rel…
This release is to prepare for v4 release, which will include some breaking changes. Especially typing store with middleware will be changed. This release gives partial migration path (see tests/middlewareTypes.test.tsx for examples), so it's highly recommended to try this version before v4 comes and report issues.
It also fixes some small typing issues and improves UMD/SystemJS bundling. Oh, and last but not least, vite users don't need to set NODE_ENV anymore.
__DEV__ to control development mode by @dai-shi in https://github.com/pmndrs/zustand/pull/789Full Changelog: https://github.com/pmndrs/zustand/compare/v3.6.9...v3.7.0
This adds UMD and SystemJS builds for CDN.
This adds UMD and SystemJS builds for CDN.
Full Changelog: https://github.com/pmndrs/zustand/compare/v3.6.8...v3.6.9
fix(middleware/devtools): deprecate passing name directly instead of an object by @devanshj in https://github.com/pmndrs/zustand/pull/731
This fixes some issues in devtools middleware.
Full Changelog: https://github.com/pmndrs/zustand/compare/v3.6.7...v3.6.8
There was a regression in devtools middleware in v3.6.6, which is fixed.
There was a regression in devtools middleware in v3.6.6, which is fixed.
Full Changelog: https://github.com/pmndrs/zustand/compare/v3.6.6...v3.6.7
This fixes and improves devtools middleware. The basic usage shouldn't be changed. If you have questions on usage, please open a new discussion.
This fixes and improves devtools middleware. The basic usage shouldn't be changed. If you have questions on usage, please open a new discussion.
devtools by @devanshj in https://github.com/pmndrs/zustand/pull/675Full Changelog: https://github.com/pmndrs/zustand/compare/v3.6.5...v3.6.6
This version further improves to fix some typing issues introduced in v3.6.0 and fixes persist api introduced in v3.6.3.
This version further improves to fix some typing issues introduced in v3.6.0 and fixes persist api introduced in v3.6.3.
Full Changelog: https://github.com/pmndrs/zustand/compare/v3.6.4...v3.6.5
This improves devtools middleware and typing of other middlewares. Please feel free to update and report any issues.
This improves devtools middleware and typing of other middlewares. Please feel free to update and report any issues.
Full Changelog: https://github.com/pmndrs/zustand/compare/v3.6.3...v3.6.4
The new persist middleware exposes persist api in store. This is thanks to the new customizable store api types introduced in v3.6.
The new persist middleware exposes persist api in store. This is thanks to the new customizable store api types introduced in v3.6.
Full Changelog: https://github.com/pmndrs/zustand/compare/v3.6.2...v3.6.3
v3.6.0 introduced middleware types trying to infer store types as much as possible. However, it doesn't work well for several cases, and users need to
v3.6.0 introduced middleware types trying to infer store types as much as possible. However, it doesn't work well for several cases, and users need to type manually which was actually hard. In this version, middleware types are simplified and let users to explicitly type when needed more easily. Many examples are in tests/middlewareTypes.test.tsx. If you find issues or need some more typing examples, please report them.
Full Changelog: https://github.com/pmndrs/zustand/compare/v3.6.1...v3.6.2
This fixes some type issues introduced in v3.6.0. devtools is improved to accept updating state from DevTools Ext.
This fixes some type issues introduced in v3.6.0. devtools is improved to accept updating state from DevTools Ext.
Full Changelog: https://github.com/pmndrs/zustand/compare/v3.6.0...v3.6.1
It's tricky implementation-wise. Please report issues and let's look for solutions or workarounds. It has renamed and deprecated types: UseStore 👉 Use…
This version mainly comes with type improvement for middleware. It's tricky implementation-wise. Please report issues and let's look for solutions or workarounds.
It has renamed and deprecated types: UseStore 👉 UseBoundStore
A new subscribeWithSelector middleware is added, deprecating the equivalent feature in core.
subscribeWithSelector middlewarePreviously, you could do this:
const useStore = create(...)
useStore.subscribe(callback, selector, equalityFn)
which is deprecated and replaced with:
const useStore = create(subscribeWithSelector(...))
useStore.subscribe(selector, callback, { equalityFn }) // selector is not optional
Full Changelog: https://github.com/pmndrs/zustand/compare/v3.5.14...v3.6.0
Fixed a regression in devtools that was introduced in v3.5.11.
Fixed a regression in devtools that was introduced in v3.5.11.
Full Changelog: https://github.com/pmndrs/zustand/compare/v3.5.13...v3.5.14
The persist middleware has a new option partialize which works for nested properties, deprecating blacklist and whitelist options.
The persist middleware has a new option partialize which works for nested properties, deprecating blacklist and whitelist options.
v3.5.11 accidentally requires newer node.js versions. v3.5.12 fixes it by reverting exports format.
v3.5.11 accidentally requires newer node.js versions. v3.5.12 fixes it by reverting exports format.
⚠️ Minimum Node.js requirements (for server-side usage like Next.js): v14.13.0, v12.20.0
⚠️ Minimum Node.js requirements (for server-side usage like Next.js): v14.13.0, v12.20.0
This improved devtools middleware. There can still be room for improvement. Free free to open issues and feature requests, and possibly contribute to them.
Our fixes for ESM in v3.5.8 and v3.5.9 were somewhat good and somewhat bad. Now, this should be the better one based on our experience and reported is
Our fixes for ESM in v3.5.8 and v3.5.9 were somewhat good and somewhat bad. Now, this should be the better one based on our experience and reported issues. If you still have some issues, please file them.
We've been struggling with providing package that works for various bundlers and node. v3.5.8 was expected to solve the issue with node, but it turned
We've been struggling with providing package that works for various bundlers and node. v3.5.8 was expected to solve the issue with node, but it turned out having an issue with webpack 5. We basically gave up supporting old bundlers. v3.5.9 comes with simplified builds with latest standard.
Note for old bundlers like webpack 4: Unlike previous versions, the bundler will pick cjs build by default. If you need module build, it should be explicit. Free free to open an issue for questions and discussions.
This improves ESM build. - #507 fix(build): Improved ESM support for most used bundlers with fallbacks for older bundlers
This improves ESM build.
This includes a fix for zustand/context for TypeScript.
This includes a fix for zustand/context for TypeScript.
This fixed zustand/context types and added "import" export entries for modern bundlers.
This fixed zustand/context types and added "import" export entries for modern bundlers.
This supports IE11 again. (v3.5.3 and v3.5.4 have an issue.) It also has various fixes and improvements in the persist middleware.
This supports IE11 again. (v3.5.3 and v3.5.4 have an issue.) It also has various fixes and improvements in the persist middleware.
v3.5.3 has an issue in CJS build. Please use this instead.
v3.5.3 has an issue in CJS build. Please use this instead.
(v3.5.3 includes #419, which causes a build issue in CJS. Please use v3.5.4)
(v3.5.3 includes #419, which causes a build issue in CJS. Please use v3.5.4)
This includes some type improvements in zustand/middleware and improvements/changes in zustand/context.
This has various small but non-trivial improvements.
This has various small but non-trivial improvements.
This includes some fixes in zustand/context.
This includes some fixes in zustand/context.
This modifies State base type. It's stricter than before and can be a breaking change for TS users. This also adds a new bundle zustand/context which…
This modifies State base type. It's stricter than before and can be a breaking change for TS users. This also adds a new bundle zustand/context which provides a helper function for the usage with React context.
This includes two small updates.
This includes two small updates.
v3.4.0 has a serious issue in the CJS build. This it to fix it.
v3.4.0 has a serious issue in the CJS build. This it to fix it.
[BREAKING CHANGE] index.cjs.js is renamed to index.js (explicit cjs usage is no longer documented in readme)
(IMPORTANT: It turns out that this version has a serious issue in CJS build. Please use v3.4.1 instead.)
This release is mainly to change build tooling and package file structure. It now uses esbuild to build esm bundles. The esm bundles are in esm folder, and default cjs bundles are in the root folder.
Changes:
This improves types for setState in TypeScript.
This improves types for setState in TypeScript.
This improves persist middleware.
This improves persist middleware.
This patch release fixes an edge case with useLayoutEffect
This patch release fixes an edge case with useLayoutEffect
See: #275, #258, #254, #251, #246
See: #275, #258, #254, #251, #246
storage options is replaced with getStorageblacklist / whitelist optionsonRehydrateStorage optionversion option (data format is changed)[BREAKING CHANGE] This includes a breaking change in undocumented api and behavior.
This release improves scoped subscription api (subscription with selector).
[BREAKING CHANGE] This includes a breaking change in undocumented api and behavior.
Pre-v3.2:
const store = create(...)
store.subscribe((foo, error) => {
...
}, state => state.foo)
// errors in the selector are caught and passed as the second argument of the listener.
v3.2:
const store = create(...)
store.subscribe((foo, prevFoo) => {
...
}, state => state.foo)
// the second argument of the listener is previous value and errors in the selector are not caught.
This patch release adds a new persist middleware.
This patch release adds a new persist middleware.
This patch release adds a small fix in devtools middleware.
This patch release adds a small fix in devtools middleware.
This patch release adds an improvement in devtools middleware.
This patch release adds an improvement in devtools middleware.
## Bug fixes - #179 ## Doc fixes - #176 - #177 - #181
Your coding agent can read these notes before it upgrades. Set up the MCP server →