[Fiber] Detect useSyncExternalStore mutations missed while Activity tree was hidden (#36947)
Fixes #27670. When an Activity subtree is hidden, its passive effects are disconnected, which unsubscribes from the store. On reveal, the effects are reconnected by replaying the fiber's effect list without a render, but if `updateStoreInstance` was not in the effect list then the component would be left stale. This happened both when a layout effect mutated the store during the reveal commit (after the subtree rendered but before it resubscribed) and when the store changed while hidden and the component bailed out of rendering during the reveal. We now push the updateStoreInstance effect unconditionally but tag it with HookHasEffect only under the same conditions as before, so regular commits skip it when nothing changed but reconnection always triggers it so it can trigger a rerender if appropriate.
S
Sophie Alpert committed
2860e00cf8780dc2d59b87f3ff28ac88b908660f
Parent: fa5212c
Committed by GitHub <noreply@github.com>
on 7/21/2026, 3:39:09 AM