You hide a settings panel with {isOpen && <Panel />} . The user reopens it two seconds later, and the unsaved toggle they'd flipped is back to its default. The scroll position is gone. The debounced search they'd typed into a nested filter has vanished. Nothing is broken — React unmounted <Panel /> and mounted a brand new one, exactly as that code tells it to. You just didn't mean to ask for that.
Before React 19.2, there was no built-in way to say "hide this, but keep it exactly as it was." CSS ( display: none while the component stays mounted) keeps the state, but its effects keep running in the background — timers ticking, subscriptions open, polling a screen nobody can see. Unmounting runs cleanup correctly but throws the state away. There was no option between "alive and visible" and "gone."
React 19.2 (released October 2025) added <Activity> to close that gap: a built-in way to hide a subtree while keeping its state intact.…