Zustand · Type Alias
Write
Write state in Zustand by defining an action that calls set with the new value. Use get when the next value depends on current state.
Last updated
Syntax
create<State>()((set, get) => ({ state, action: () => set({ state: value }) }))In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
createcreateStorepersistsetgetuseStore