Zustand · Concept
derived state
Derived state is a value calculated from existing Zustand state. A selector computes it when needed, so the store does not need a duplicate field.
Last updated
Syntax
useBearStore((state) => state.bears * state.foodPerBear)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
createuseStoreuseShallowcreateWithEqualityFnTypeScript