Skip to content

Release v1.2.1

Choose a tag to compare

@github-actions github-actions released this 09 Jun 11:18
· 393 commits to main since this release

Patch Changes

  • fab33c4: - ✨ Support for Zustand-style slice composition via SliceCreator utility type.

    • Now you can structure your store in a modular, scalable way by composing smaller slices and combining them into a single store.
    export type SliceCreator<TStore extends BaseType, TSlice = Partial<TStore>> = (
      set: StateSetter<TStore>,
      get: () => TStore | null,
    ) => TSlice;

    Usage

    const useKosha = create<StoreType>((...a) => ({
      ...createThemeSlice(...a),
      ...counterSlice(...a),
    }));
    

Full Changelog: 1.2.0...1.2.1