Skip to content

Commit 0ba2036

Browse files
committed
Remove check in renderDidSuspendDelayIfPossible
I don't think we need this anymore. It was added originally because RootSuspended would take priority over RootSuspendedWithDelay. But we've since changed it: any "bad" fallback state is permitted to block a "good" fallback state. So I think we can just delete this.
1 parent 1a90262 commit 0ba2036

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

packages/react-reconciler/src/ReactFiberWorkLoop.new.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,13 +1926,7 @@ export function renderDidSuspend(): void {
19261926
}
19271927

19281928
export function renderDidSuspendDelayIfPossible(): void {
1929-
if (
1930-
workInProgressRootExitStatus === RootInProgress ||
1931-
workInProgressRootExitStatus === RootSuspended ||
1932-
workInProgressRootExitStatus === RootErrored
1933-
) {
1934-
workInProgressRootExitStatus = RootSuspendedWithDelay;
1935-
}
1929+
workInProgressRootExitStatus = RootSuspendedWithDelay;
19361930

19371931
// Check if there are updates that we skipped tree that might have unblocked
19381932
// this render.

packages/react-reconciler/src/ReactFiberWorkLoop.old.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,13 +1926,7 @@ export function renderDidSuspend(): void {
19261926
}
19271927

19281928
export function renderDidSuspendDelayIfPossible(): void {
1929-
if (
1930-
workInProgressRootExitStatus === RootInProgress ||
1931-
workInProgressRootExitStatus === RootSuspended ||
1932-
workInProgressRootExitStatus === RootErrored
1933-
) {
1934-
workInProgressRootExitStatus = RootSuspendedWithDelay;
1935-
}
1929+
workInProgressRootExitStatus = RootSuspendedWithDelay;
19361930

19371931
// Check if there are updates that we skipped tree that might have unblocked
19381932
// this render.

0 commit comments

Comments
 (0)