zustand
5.0.16 · 22 Oct 2026MIT87.8M / weekRepositorynpmAtom feed
Upgrading zustand From 1.0.7 to 2.0.0
1 release in betweenevery note read
Reading releases, release notes and advisories…
- ?
- changes to make
- 0
- advisories fixed
- 0
- new
- 0
- fixes
6 other lines we could not sort, mostly version bumps
- 2.0.0
Removed ESM and IIFE versions of middleware.js and shallow.js. Any imports of the ".cjs" files should be changed from "zustand/{name}.cjs" to just "zustand/{name}" as they are all CommonJS now (index.js still has different formats).
- 2.0.0
api.subscribehas a new function signature that removes the object wrapper:api.subscribe(listener, selector?, equalityFn?). - 2.0.0
StateListenertype has changed. An overloaded signature was added for better error handling. - 2.0.0
Subscribetype has changed. It uses the updatedStateListenertype. - 2.0.0
listenersare iterated in a different order than they were before. Parent to child rather than child to parent. It would be rare if this causes any issues. - 2.0.0
The automatic fix when passing an array as the second arg of
useStorewas removed.useStorewill throw an Uncaught TypeError if the second arg is an array.