@coaction/zustand
v3.0.0
Published
A Coaction integration tool for Zustand
Readme
@coaction/zustand
A Coaction integration tool for Zustand
Installation
Install it with pnpm:
pnpm add 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 }))
}))
)
);Limitations
@coaction/zustandonly supports binding a whole Zustand store.- Coaction
Slicesmode is not supported in this adapter.
Documentation
You can find the documentation here.
