React · Senior · Question 15 of 75
What does the <Activity mode="hidden"> component (React 19.2) do?
- ✓Correct answer: Hides the subtree, keeping its state and tearing down effects
- 2Removes the subtree from the DOM and resets all its state
- 3Pauses rendering of the subtree but keeps effects active
Explanation
The hidden subtree gets display: none, effects are cleaned up, and updates render at low priority. When switched back to visible, state (typed text, scroll) is preserved and effects are recreated. Handy for tabs and pre-rendering screens the user is likely to visit.