Skip to content

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Sep 17, 2025

Stacked on #34455

Mostly so that we don't trigger unnecessary warnings in older React versions.

We could avoid the additional capability in favor checking if the root exists in the Suspense tree but that may hide legit bugs.

@meta-cla meta-cla bot added the CLA Signed label Sep 17, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Sep 17, 2025
@eps1lon eps1lon changed the title [DevTools] Ignore renderers without support for a dedicated Suspense [DevTools] Ignore renderers without support for a dedicated Suspense tree Sep 17, 2025
@eps1lon eps1lon marked this pull request as ready for review September 17, 2025 14:18
@eps1lon eps1lon changed the title [DevTools] Ignore renderers without support for a dedicated Suspense tree [DevTools] Record Suspense node for roots in legacy renderers Sep 17, 2025
@eps1lon eps1lon force-pushed the sebbie/09-17-_devtools_ignore_renderers_without_support_for_a_dedicated_suspense_tree branch from 0b28992 to 7448b1b Compare September 18, 2025 10:37
pendingUnmountedIDs.push(id);
const isRoot = parentIDStack.length === 0;
if (isRoot) {
pendingUnmountedRootID = id;
Copy link
Collaborator Author

@eps1lon eps1lon Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pendingUnmountedRootID was never actually written to. The root was just unmounted by virtue of being included in the normal unmount operation. There wasn't anything special to be done with the root until now.

A single unmounted root ID is sound since we always flush operations after unmounting a component.

@eps1lon eps1lon force-pushed the sebbie/09-17-_devtools_ignore_renderers_without_support_for_a_dedicated_suspense_tree branch from 7448b1b to d94b3cf Compare September 18, 2025 16:43
@eps1lon eps1lon merged commit 03a96c7 into facebook:main Sep 18, 2025
241 checks passed
@eps1lon eps1lon deleted the sebbie/09-17-_devtools_ignore_renderers_without_support_for_a_dedicated_suspense_tree branch September 18, 2025 16:52
github-actions bot pushed a commit to code/lib-react that referenced this pull request Sep 21, 2025
github-actions bot pushed a commit to code/lib-react that referenced this pull request Sep 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants