Packages

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…

Other targets from 1.0.7Latest5.0.16
The note of 2.0.0 lists no breaking change or deprecation, which is rare for a major.
  1. 1.0.7yours
  2. 2.0.0target
?
changes to make
0
advisories fixed
0
new
0
fixes
6 other lines we could not sort, mostly version bumps
  • 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.subscribe has a new function signature that removes the object wrapper: api.subscribe(listener, selector?, equalityFn?).

    2.0.0
  • StateListener type has changed. An overloaded signature was added for better error handling.

    2.0.0
  • Subscribe type has changed. It uses the updated StateListener type.

    2.0.0
  • listeners are 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 useStore was removed. useStore will throw an Uncaught TypeError if the second arg is an array.

    2.0.0