Releases: udecode/zustand-x
Releases · udecode/zustand-x
@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> ); };
@udecode/[email protected]
Major Changes
- #34
22f07f6
Thanks @ShinyLeee! - selector hooks support passing equality function
@udecode/[email protected]
Minor Changes
- #32
d3aa69c
Thanks @ShinyLeee! - Support logging action name when devtools enabled
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
Patch Changes
- #22
196501f
Thanks @xuanduc987! - Allow deleting properties from state