Zustand · Type Alias
StoreApi
useStore lets a React component read a vanilla Zustand store. Pass the store API and, usually, a selector for the data the component needs.
Last updated
Syntax
useStore<T, U = T>(store: StoreApi<T>, selectorFn?: (state: T) => U): UIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
createStoreStoreApizustand/vanillauseStore