Releases: udecode/zustand-x
Releases · udecode/zustand-x
[email protected]
Patch Changes
- #95 by @imarabinda –
- fix: missing export
mapValuesKey
- fix: missing export
[email protected]
Major Changes
-
#92 by @imarabinda –
- Added support for Zustand 4.5.0+.
mutative
support. Passmutative: true
in the options.
Migration Instructions
Update the Store Initialization:
-
Replace the old method of initializing the store with the new API.
const store = createStore( () => ({ name: 'zustandX', stars: 0, }), { name: 'repo', immer: true, } );
or
const store = createStore( { name: 'zustandX', stars: 0, }, { name: 'repo', immer: true, } );
-
Ensure to pass the configuration object with name and other options as needed.
-
If your application relies on immer, enable it by passing immer: true in the configuration object.
const store = createStore( () => ({ name: 'zustandX', stars: 0, }), { name: 'repo', immer: true, } );
-
With the new version, integrating middlewares has also changed. Here's how to upgrade your middleware usage:
const store = createStore( middlewareWrapHere(() => ({ name: 'zustandX', stars: 0, })), { name: 'repo', immer: true, } );
[email protected]
[email protected]
[email protected]
[email protected]
Patch Changes
- #69 by @zbeyens –
- Fixes #60 –
[DEPRECATED] Passing a vanilla store will be unsupported in a future version
- Support
equalityFn
towards v5. See https://github.com/pmndrs/zustand/discussions/1937.
- Fixes #60 –
[email protected]
@udecode/[email protected]
Major Changes
- #57
2b1dbeb
Thanks @enchorb! - Upgraded zustand
to version 4, bringing in several new features and improvements.- Deprecated types in
zustand
v4+ were addressed by including them in the package itself. - Upgraded
immer
to the latest version. - The upgrade to
zustand
v4 andimmer
introduces enhancements, bug fixes, and performance optimizations to your application. - Please make sure to review the official documentation of
zustand
v4 andimmer
for any additional changes and updates.
- Deprecated types in
@udecode/[email protected]
Patch Changes
- #49
0a0ee89
Thanks @GoodbyeNJN! - fix: updatePersistOptions
typing
@udecode/[email protected]
Patch Changes
- #47
ac2379c
Thanks @GoodbyeNJN! - feat: support persist name is different from store name