Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumReactglobal state Zustand ReduxSingle-choice MCQ

You have a Zustand store and want a derived value computed from two state fields without storing it. A component does the computation in the selector. What is the subtle correctness risk?

const total = useStore((s) => s.price * s.qty);