Releases: react18-tools/kosha
Releases · react18-tools/kosha
Release v1.3.1
Patch Changes
- e39433b: Remove next.js from peedDependency
What's Changed
- Bump next from 15.3.3 to 15.3.4 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #3
- Bump next from 15.3.4 to 15.3.5 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #4
- Bump next from 15.3.5 to 15.4.1 in the npm_and_yarn group across 1 directory by @dependabot[bot] in #5
- Clean up by @mayank1513 in #6
Full Changelog: 1.3.0...1.3.1
Release v1.3.0
Minor Changes
- 45bc498: Add test utils
Patch Changes
- 8519f91: Add immer as optional peer dependency
Full Changelog: 1.2.1...1.3.0
Release v1.2.1
Patch Changes
-
fab33c4: - ✨ Support for Zustand-style slice composition via
SliceCreatorutility 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
Release v1.2.0
Minor Changes
-
303dd10: ✨ Feature: Introduced
immermiddleware for KoshaYou can now opt-in to immutable state updates via Immer.
This enables writing simpler, more intuitive state updates using mutable-like syntax:
const useStore = create( immer(set => ({ count: 0, increment: () => set(state => { state.count++; }), })), );
💡 Listeners will still be triggered correctly as Immer tracks mutations internally and returns new state safely.
Use with care: avoid returning any value from the mutator function to ensure Immer can do its job properly.
Full Changelog: 1.1.2...1.2.0
Release v1.1.2
Patch Changes
- c549be2: Simplify and enforce immutability to ensure state is not modified in the function passed to set.
Full Changelog: 1.1.1...1.1.2
Release v1.1.1
Release v1.1.0
Minor Changes
-
60cc3d0: Add setState, Enhanced Testability
Highlights:
✅ Exposed useStore.setState() for external updates and testing ✅ Supports both partial and full state updates via replace flag 🧪 Enables mock-friendly store patterns for unit testing 🔄 Adds overload-safe StateSetter type for better DX 📄 Docs updated with usage examples and known limitations
Full Changelog: 1.0.6...1.1.0