[DevTools] Fix crash when revealing stable, filtered <Activity> children#493
[DevTools] Fix crash when revealing stable, filtered <Activity> children#493everettbu wants to merge 2 commits into
<Activity> children#493Conversation
Greptile OverviewGreptile SummaryThis PR fixes a DevTools backend reconciliation bug when an Offscreen/Activity boundary transitions from Previously, hidden Activity children were not mounted (and were unmounted when hiding), but the hidden→visible transition could still go through the update/reconcile path. When component filters caused the apparent child set to differ (e.g. filtered wrappers around stable children), this led to an invariant crash ( The change introduces a dedicated branch for Confidence Score: 5/5
Important Files Changed
|
|
Upstream PR was closed or merged. Code is synced via branch mirror. |
Mirror of facebook/react#35734
Original author: eps1lon
Summary
This aligns the hidden -> visible Activity path with how we treat hidden Activity. Since we don't mount hidden Activity children, we need to switch to the mount path when updating an Activity from hidden to visible.
This mostly went unnoticed since the update that reveals Activity also created fresh children. But for children from props, we continue down the update path and then later crash because children unexpectedly changed.
Originally I added an extra
isReconnectingSubtreebefore realizing the whole transition from hidden to visible wasn't correctly modelled.How did you test this change?
The children should not have changed if we pass in the same set.)