diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js index b4b333547c194..d5372999f3c46 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js @@ -894,23 +894,7 @@ function recoverFromConcurrentError(root, errorRetryLanes) { } } - let exitStatus; - - const MAX_ERROR_RETRY_ATTEMPTS = 50; - for (let i = 0; i < MAX_ERROR_RETRY_ATTEMPTS; i++) { - exitStatus = renderRootSync(root, errorRetryLanes); - if ( - exitStatus === RootErrored && - workInProgressRootRenderPhaseUpdatedLanes !== NoLanes - ) { - // There was a render phase update during this render. Some internal React - // implementation details may use this as a trick to schedule another - // render pass. To protect against an inifinite loop, eventually - // we'll give up. - continue; - } - break; - } + const exitStatus = renderRootSync(root, errorRetryLanes); executionContext = prevExecutionContext; diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js index d8bb61af50c84..92be9f0a323a9 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js @@ -894,23 +894,7 @@ function recoverFromConcurrentError(root, errorRetryLanes) { } } - let exitStatus; - - const MAX_ERROR_RETRY_ATTEMPTS = 50; - for (let i = 0; i < MAX_ERROR_RETRY_ATTEMPTS; i++) { - exitStatus = renderRootSync(root, errorRetryLanes); - if ( - exitStatus === RootErrored && - workInProgressRootRenderPhaseUpdatedLanes !== NoLanes - ) { - // There was a render phase update during this render. Some internal React - // implementation details may use this as a trick to schedule another - // render pass. To protect against an inifinite loop, eventually - // we'll give up. - continue; - } - break; - } + const exitStatus = renderRootSync(root, errorRetryLanes); executionContext = prevExecutionContext;