dillon1000/react
Commit
Browse files [Fiber] Don't unhide a node if a direct parent offscreen is still hidden (#34821)
If an inner Offscreen commits an unhide, but an outer Offscreen is still hidden but they're controlling the same DOM node then we shouldn't unhide the DOM node yet. This keeps track of whether we're directly inside a hidden offscreen. It might be better to just do the tree search instead of keeping the stack state since it's a rare case. Although this hide/unhide path does trigger a lot of times even when there's no change. This was technically a bug with Suspense too but it doesn't appear because a suspended Suspense boundary never commits its partial state. If it did, it would trigger this same path. But it can happen with an outer Activity and inner Suspense.
Changed paths3 files
First-parent comparisonpackages/react-reconciler/src/ReactFiberCommitWork.js ModifiedM packages/react-reconciler/src/__tests__/Activity-test.js ModifiedM packages/react-reconciler/src/__tests__/ReactSuspenseEffectsSemantics-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…