State Management · Junior · Question 21 of 75
Which components re-render when a provider's value changes?
- ✓Correct answer: Every component that reads this context with
useContext - 2Only the provider itself
- 3Only components that receive the value through props
Explanation
All consumers of the context re-render, even if they use only one field of a large object. That's why Context is great for rarely changing values and less suitable for frequently changing state.