State Management · Junior · Question 22 of 75
Which data is a good fit for Context?
- ✓Correct answer: Rarely changing, widely needed values: theme, locale, current user
- 2A text input's value that changes on every keystroke
- 3A list of 10,000 items that updates every second
Explanation
Context shines for app-wide settings and dependencies (e.g. an API client). Rapidly changing values in a widely used context cause many re-renders; keep such state local or use a store with selectors.