From ceee524a8f45b97c5fa9861aec3f36161495d2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Markb=C3=A5ge?= Date: Fri, 17 Dec 2021 09:40:39 -0800 Subject: [PATCH] Remove unnecessary clearContainer call (#22979) 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. --- packages/react-reconciler/src/ReactFiberWorkLoop.new.js | 2 -- packages/react-reconciler/src/ReactFiberWorkLoop.old.js | 2 -- 2 files changed, 4 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js index f0f5eab4a99f5..740ed6dca40a5 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js @@ -86,7 +86,6 @@ import { cancelTimeout, noTimeout, afterActiveInstanceBlur, - clearContainer, getCurrentEventPriority, supportsMicrotasks, errorHydratingContainer, @@ -885,7 +884,6 @@ function recoverFromConcurrentError(root, errorRetryLanes) { if (__DEV__) { errorHydratingContainer(root.containerInfo); } - clearContainer(root.containerInfo); } let exitStatus; diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js index 353de50e1585a..673da7908c289 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js @@ -86,7 +86,6 @@ import { cancelTimeout, noTimeout, afterActiveInstanceBlur, - clearContainer, getCurrentEventPriority, supportsMicrotasks, errorHydratingContainer, @@ -885,7 +884,6 @@ function recoverFromConcurrentError(root, errorRetryLanes) { if (__DEV__) { errorHydratingContainer(root.containerInfo); } - clearContainer(root.containerInfo); } let exitStatus;