Skip to content

Commit

Permalink
Remove unnecessary clearContainer call (#22979)
Browse files Browse the repository at this point in the history
This was added when we added error recovery for hydration errors. However,
when the fix up pass happens later on, it'll still call clearContainer in
the commit phase. So this call is unnecessary.
  • Loading branch information
sebmarkbage committed Dec 17, 2021
1 parent aa8f2bd commit ceee524
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions packages/react-reconciler/src/ReactFiberWorkLoop.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ import {
cancelTimeout,
noTimeout,
afterActiveInstanceBlur,
clearContainer,
getCurrentEventPriority,
supportsMicrotasks,
errorHydratingContainer,
Expand Down Expand Up @@ -885,7 +884,6 @@ function recoverFromConcurrentError(root, errorRetryLanes) {
if (__DEV__) {
errorHydratingContainer(root.containerInfo);
}
clearContainer(root.containerInfo);
}

let exitStatus;
Expand Down
2 changes: 0 additions & 2 deletions packages/react-reconciler/src/ReactFiberWorkLoop.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ import {
cancelTimeout,
noTimeout,
afterActiveInstanceBlur,
clearContainer,
getCurrentEventPriority,
supportsMicrotasks,
errorHydratingContainer,
Expand Down Expand Up @@ -885,7 +884,6 @@ function recoverFromConcurrentError(root, errorRetryLanes) {
if (__DEV__) {
errorHydratingContainer(root.containerInfo);
}
clearContainer(root.containerInfo);
}

let exitStatus;
Expand Down

0 comments on commit ceee524

Please sign in to comment.