Skip to content
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

[Fiber] Extract Functions that Call User Space and Host Configs in Commit to Separate Modules #30881

Merged
merged 7 commits into from
Sep 6, 2024
7 changes: 2 additions & 5 deletions packages/react-reconciler/src/ReactFiberCommitWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,7 @@ function commitDeletionEffectsOnFiber(
nearestMountedAncestor: Fiber,
deletedFiber: Fiber,
) {
// TODO: Delete this Hook once new DevTools ships everywhere. No longer needed.
onCommitUnmount(deletedFiber);

// The cases in this outer switch modify the stack before they traverse
Expand Down Expand Up @@ -1926,11 +1927,7 @@ function recursivelyTraverseMutationEffects(
if (deletions !== null) {
for (let i = 0; i < deletions.length; i++) {
const childToDelete = deletions[i];
try {
commitDeletionEffects(root, parentFiber, childToDelete);
} catch (error) {
captureCommitPhaseError(childToDelete, parentFiber, error);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This catch was removed since it should be handled by the individual calls deeper.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not all host config methods are wrapped because that would be a lot of them so doesn't seem worth it. E.g. the Float ones could error and take other things along with it.

commitDeletionEffects(root, parentFiber, childToDelete);
}
}

Expand Down