0.1.5 • Published 11 months ago
@coaction/zustand v0.1.5
@coaction/zustand
A Coaction integration tool for Zustand
Installation
You can install it via npm, yarn or pnpm.
npm install coaction @coaction/zustandUsage
import { create } from 'coaction';
import { bindZustand } from '@coaction/zustand';
import { create as createWithZustand } from 'zustand';
const useStore = create(() =>
createWithZustand(
bindZustand((set) => ({
count: 1,
inc: () => set((state) => ({ count: state.count + 1 }))
}))
)
);Documentation
You can find the documentation here.
0.1.5
11 months ago