-
Notifications
You must be signed in to change notification settings - Fork 49.5k
[DevTools] Record Suspense node for roots in legacy renderers #34516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DevTools] Record Suspense node for roots in legacy renderers #34516
Conversation
0b28992
to
7448b1b
Compare
pendingUnmountedIDs.push(id); | ||
const isRoot = parentIDStack.length === 0; | ||
if (isRoot) { | ||
pendingUnmountedRootID = id; |
There was a problem hiding this comment.
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.
…tree Mostly so that we don't trigger unnecessary warnings in older React versions.
7448b1b
to
d94b3cf
Compare
[diff facebook/react@84af9085...d415fd3e](facebook/react@84af908...d415fd3) <details> <summary>React upstream changes</summary> - facebook/react#34536 - facebook/react#34534 - facebook/react#34531 - facebook/react#34499 - facebook/react#34523 - facebook/react#34511 - facebook/react#34516 - facebook/react#34455 - facebook/react#34488 - facebook/react#34521 </details>
…ok#34516) DiffTrain build for [03a96c7](facebook@03a96c7)
…ok#34516) DiffTrain build for [03a96c7](facebook@03a96c7)
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.