Zustand · Pipe
merge
Zustand updates state immutably. set merges returned fields at the top level, while nested objects need explicit spreading; a true replace flag replaces the whole state.
Last updated
Syntax
set(partial, replace?)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
Updating nested state object valuesUpdating stateset functionReact useState