@samitouri / QOS-React-2 / commits / ceee524a8f

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.

Sebastian Markbåge committed Dec 17, 2021 at 09:40 UTC ceee524a8f45b97c5fa9861aec3f36161495d2e1
2 files changed -4
packages/react-reconciler/src/ReactFiberWorkLoop.new.js
-2
@@ -86,7 +86,6 @@ import {
86 cancelTimeout,
87 noTimeout,
88 afterActiveInstanceBlur,
89 - clearContainer,
89 getCurrentEventPriority,
90 supportsMicrotasks,
91 errorHydratingContainer,
@@ -885,7 +884,6 @@ function recoverFromConcurrentError(root, errorRetryLanes) {
884 if (__DEV__) {
885 errorHydratingContainer(root.containerInfo);
886 }
888 - clearContainer(root.containerInfo);
887 }
888
889 let exitStatus;
packages/react-reconciler/src/ReactFiberWorkLoop.old.js
-2
@@ -86,7 +86,6 @@ import {
86 cancelTimeout,
87 noTimeout,
88 afterActiveInstanceBlur,
89 - clearContainer,
89 getCurrentEventPriority,
90 supportsMicrotasks,
91 errorHydratingContainer,
@@ -885,7 +884,6 @@ function recoverFromConcurrentError(root, errorRetryLanes) {
884 if (__DEV__) {
885 errorHydratingContainer(root.containerInfo);
886 }
888 - clearContainer(root.containerInfo);
887 }
888
889 let exitStatus;