Skip to content

Releases: udecode/zustand-x

@udecode/[email protected]

24 Apr 02:02
805cd0f
Compare
Choose a tag to compare

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]

22 Apr 10:56
864c22b
Compare
Choose a tag to compare

Minor Changes

  • #36 c66963c Thanks @ShinyLeee! - react-tracked support

    Use 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 the useTracked 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]

21 Apr 11:37
1a985db
Compare
Choose a tag to compare

Major Changes

@udecode/[email protected]

18 Apr 12:37
f4eca2f
Compare
Choose a tag to compare

Minor Changes

@udecode/[email protected]

01 Feb 20:14
faf86ab
Compare
Choose a tag to compare

Patch Changes

@udecode/[email protected]

24 Dec 12:46
ebd98c1
Compare
Choose a tag to compare

Patch Changes

  • #24 29d8bb3 Thanks @zbeyens! - fix: extended actions get parameter was missing the extended selectors.

@udecode/[email protected]

23 Dec 12:09
cb4d90f
Compare
Choose a tag to compare

Patch Changes

@udecode/[email protected]

08 Nov 15:36
c067d92
Compare
Choose a tag to compare

Patch Changes

@udecode/[email protected]

06 Oct 12:22
7893137
Compare
Choose a tag to compare

Minor Changes

  • #17 a2b1b5c Thanks @zbeyens! - changes:
    • createStore options:
      • from persist to persist.enabled
      • from devtools to devtools.enabled
      • from enableAutoFreeze to immer.enabledAutoFreeze
    • types

@udecode/[email protected]

29 Sep 17:05
65deff7
Compare
Choose a tag to compare

Minor Changes