Skip to content

v2.1.0

Choose a tag to compare

@mark-pro mark-pro released this 04 Jan 16:15
· 4 commits to main since this release
694ff70

Added combine function to help with type inference

The new combine function combines initial state and actions together to help
with TypeScript type inference.

const useCount = create(
    combine({ count: 0 }, (set) => ({ 
        inc: set(state => ({ count: state.count + 1 }) 
    }))
)

Full Changelog: v2.0.1...v2.1.0