-
Notifications
You must be signed in to change notification settings - Fork 46.8k
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] Further Refactoring of Unmounts #30658
Commits on Aug 12, 2024
-
Move instances creation to explicitly only happen during reconciliation
So we don't end up with hanging other instances.
Configuration menu - View commit details
-
Copy full SHA for acdbf96 - Browse repository at this point
Copy the full SHA acdbf96View commit details -
Don't conditionally check _debugNeedsRemount
I don't think this ever made sense because this flag is only active on the fiber that was deleted. There will be a new one that gets a new id anyway. So this must have just leaked the old fibers.
Configuration menu - View commit details
-
Copy full SHA for 93b3e72 - Browse repository at this point
Copy the full SHA 93b3e72View commit details -
Remove the notion of simulated unmounts
We don't need this distinction because we're not doing them in any reverse order.
Configuration menu - View commit details
-
Copy full SHA for 341ef14 - Browse repository at this point
Copy the full SHA 341ef14View commit details -
Unmount and remount root fully when updating filters
This means warnings/errors get reset.
Configuration menu - View commit details
-
Copy full SHA for 8c9613c - Browse repository at this point
Copy the full SHA 8c9613cView commit details -
Don't include filtered fibers in the owners list
These don't have any instances but arguably they shouldn't be included in the list.
Configuration menu - View commit details
-
Copy full SHA for a13f095 - Browse repository at this point
Copy the full SHA a13f095View commit details -
Restore pending errors/warnings after unmount
We don't delete the errors until they've been shown in an unfiltered fiber. Instead rely on GC to clean up the pending errors/warnings using a weakmap.
Configuration menu - View commit details
-
Copy full SHA for 2929c49 - Browse repository at this point
Copy the full SHA 2929c49View commit details -
If we remount due to filters we've now increased ids (inspectedElement). However we also avoid creating ids for filtered components (profilingCache).
Configuration menu - View commit details
-
Copy full SHA for a76ce18 - Browse repository at this point
Copy the full SHA a76ce18View commit details -
Restore selection from last inspected when updating component filters
This uses the tracked path to select the nearest one instead of relying on a specific id still existing since it'll be remounted. It might get filtered so it's best to select nearest path anyway. I need to move the test into inspected element since we rely on the inspected element being changed to track the current selected path.
Configuration menu - View commit details
-
Copy full SHA for 11cfe0d - Browse repository at this point
Copy the full SHA 11cfe0dView commit details