Releases: udecode/zustand-x
Releases · udecode/zustand-x
[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
@udecode/[email protected]
Patch Changes
- #38
8671fcd
Thanks @ShinyLeee! - fix: selectors always cause re-render because of always return a new function
fix: correct equalityFn typing
docs: fix extendSelectors argument typo
@udecode/[email protected]
Minor Changes
-
#36
c66963c
Thanks @ShinyLeee! -react-tracked
supportUse the tracked hooks in React components, no providers needed. Select your
state and the component will trigger re-renders only if the accessed property is changed. Use theuseTracked
method:// Global tracked hook selectors export const useTrackedStore = () => mapValuesKey('useTracked', rootStore); // with useTrackStore UserEmail Component will only re-render when accessed property owner.email changed const UserEmail = () => { const owner = useTrackedStore().repo.owner(); return ( <div> <span>User Email: {owner.email}</span> </div> ); }; // with useStore UserEmail Component re-render when owner changed, but you can pass equalityFn to avoid it. const UserEmail = () => { const owner = useStore().repo.owner(); // const owner = useStore().repo.owner((prev, next) => prev.owner.email === next.owner.email) return ( <div> <span>User Email: {owner.email}</span> </div> ); };