State Management · Senior · Question 3 of 75
What's the difference between the "subscribe to a selector" model (Redux, Zustand) and Context?
- ✓Correct answer: A store notifies components and each re-renders only if its selected slice changed
- 2Context supports selectors natively via the second argument of
useContext - 3Stores re-render the whole tree, while Context updates one component
Explanation
Context has no selectors: any value change re-renders every consumer. Stores run each subscriber's selector and compare results, so updates are fine-grained. Libraries like use-context-selector emulate this on top of Context.