State Management · Senior · Question 9 of 75
What does use(Context) in React 19 add compared to useContext?
- ✓Correct answer: It can be called conditionally (e.g. after an early return)
- 2It subscribes to only one field of the context value
- 3It makes the context available in Server Components
Explanation
use isn't bound by the "top-level only" rule, so if (!show) return null; const theme = use(ThemeContext) works. Otherwise it reads the same nearest provider and doesn't add selectors.