Skip to content

Releases: udecode/zustand-x

[email protected]

05 Jul 21:52
9054812
Compare
Choose a tag to compare

Patch Changes

[email protected]

18 Apr 21:15
e644c91
Compare
Choose a tag to compare

Patch Changes

  • #73 by @marbemac – Support partial state objects in the persist typings

[email protected]

29 Dec 12:32
22dab88
Compare
Choose a tag to compare

Patch Changes

[email protected]

10 Dec 16:32
8186cac
Compare
Choose a tag to compare

Patch Changes

[email protected]

08 Dec 10:40
Compare
Choose a tag to compare

Major Changes

  • #66 by @zbeyens
    • Rename @udecode/zustood package to zustand-x
    • createZustandStore: new alias for createStore

@udecode/[email protected]

08 Jul 16:35
b6aad93
Compare
Choose a tag to compare

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 and immer introduces enhancements, bug fixes, and performance optimizations to your application.
    • Please make sure to review the official documentation of zustand v4 and immer for any additional changes and updates.

@udecode/[email protected]

08 Sep 19:49
7667b99
Compare
Choose a tag to compare

Patch Changes

@udecode/[email protected]

08 Sep 15:40
cd2b1e3
Compare
Choose a tag to compare

Patch Changes

@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>
      );
    };