pmndrs/zustand
pmndrs/zustand
Activity
Last release
Open issues
Open PRs
License
release notes
release notes
Published 11/16/2020
MinorContains breaking changesThis 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.
release notes
Published 11/16/2020
MinorContains breaking changesThis 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.
🐻 Bear necessities for state management in React