dillon1000/react

Commit

[DevTools] Unmount by walking previous nodes no longer in the new tree (#30644)

This no longer uses the handleCommitFiberUnmount hook to track unmounts.
Instead, we can just unmount the DevToolsInstances that we didn't reuse.
This doesn't account for cleaning up instances that were unnecessarily
created when they weren't in the tree. I have a separate follow up for
that.

This also removes the queuing of untracking. This was added in #21523
but I don't believe it has been needed for a while because the mentioned
flushPendingErrorsAndWarningsAfterDelay hasn't called untrackFiberID for
a while so the race condition doesn't exist. It's hard to tell though
because from the issues there weren't really any repros submitted.
Browse files
Changed paths1 file
First-parent comparison
M packages/react-devtools-shared/src/backend/fiber/renderer.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…