Skip to content

Commit

Permalink
Remove check in renderDidSuspendDelayIfPossible
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acdlite committed Nov 3, 2022
1 parent 1a90262 commit 0ba2036
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions packages/react-reconciler/src/ReactFiberWorkLoop.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -1926,13 +1926,7 @@ export function renderDidSuspend(): void {
}

export function renderDidSuspendDelayIfPossible(): void {
if (
workInProgressRootExitStatus === RootInProgress ||
workInProgressRootExitStatus === RootSuspended ||
workInProgressRootExitStatus === RootErrored
) {
workInProgressRootExitStatus = RootSuspendedWithDelay;
}
workInProgressRootExitStatus = RootSuspendedWithDelay;

// Check if there are updates that we skipped tree that might have unblocked
// this render.
Expand Down
8 changes: 1 addition & 7 deletions packages/react-reconciler/src/ReactFiberWorkLoop.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -1926,13 +1926,7 @@ export function renderDidSuspend(): void {
}

export function renderDidSuspendDelayIfPossible(): void {
if (
workInProgressRootExitStatus === RootInProgress ||
workInProgressRootExitStatus === RootSuspended ||
workInProgressRootExitStatus === RootErrored
) {
workInProgressRootExitStatus = RootSuspendedWithDelay;
}
workInProgressRootExitStatus = RootSuspendedWithDelay;

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

0 comments on commit 0ba2036

Please sign in to comment.