Releases: pmndrs/zustand
Releases · pmndrs/zustand
v3.5.0
v3.4.2
v3.4.1
v3.4.0
(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.
- [BREAKING CHANGE] index.cjs.js is renamed to index.js (explicit cjs usage is no longer documented in readme)
- [BREAKING CHANGE] index.iife.js is removed (never documented and not configured properly)
Changes:
v3.3.3
v3.3.2
v3.3.1
v3.3.0
v3.2.0
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.