Skip to content

Commit 48274a4

Browse files
authored
Remove vestigial Suspense batching logic (#25861)
This code was originally added in the old ExpirationTime implementation of Suspense. The idea is that if multiple updates suspend inside the same Suspense boundary, and both of them resolve, we should render both results in the same batch, to reduce jank. This was an incomplete idea, though. We later discovered a stronger requirement — once we show a fallback, we cannot fill in that fallback without completing _all_ the updates that were previously skipped over. Otherwise you get tearing. This was fixed by #18411, then we discovered additional related flaws that were addressed in #24685. See those PR descriptions for additional context. So I believe this older code is no longer necessary.
1 parent de7d1c9 commit 48274a4

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

packages/react-reconciler/src/ReactFiberWorkLoop.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,16 +1300,6 @@ function finishConcurrentRender(root, exitStatus, lanes) {
13001300
// There's additional work on this root.
13011301
break;
13021302
}
1303-
const suspendedLanes = root.suspendedLanes;
1304-
if (!isSubsetOfLanes(suspendedLanes, lanes)) {
1305-
// We should prefer to render the fallback of at the last
1306-
// suspended level. Ping the last suspended level to try
1307-
// rendering it again.
1308-
// FIXME: What if the suspended lanes are Idle? Should not restart.
1309-
const eventTime = requestEventTime();
1310-
markRootPinged(root, suspendedLanes, eventTime);
1311-
break;
1312-
}
13131303

13141304
// The render is suspended, it hasn't timed out, and there's no
13151305
// lower priority work to do. Instead of committing the fallback

0 commit comments

Comments
 (0)