Skip to content

Commit 7ce5183

Browse files
committed
Factor out render phase
Splits the work loop and its surrounding enter/exit code into their own functions. Now we can do perform multiple render phase passes within a single call to performConcurrentWorkOnRoot or performSyncWorkOnRoot. This lets us get rid of the `didError` field.
1 parent 2835231 commit 7ce5183

File tree

2 files changed

+162
-175
lines changed

2 files changed

+162
-175
lines changed

packages/react-reconciler/src/ReactFiberRoot.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ type BaseFiberRootProperties = {|
7474
// render again
7575
lastPingedTime: ExpirationTime,
7676
lastExpiredTime: ExpirationTime,
77-
78-
// Set to true when the root completes with an error. We'll try rendering
79-
// again. This field ensures we don't retry more than once.
80-
didError: boolean,
8177
|};
8278

8379
// The following attributes are only used by interaction tracing builds.
@@ -127,7 +123,6 @@ function FiberRootNode(containerInfo, tag, hydrate) {
127123
this.nextKnownPendingLevel = NoWork;
128124
this.lastPingedTime = NoWork;
129125
this.lastExpiredTime = NoWork;
130-
this.didError = false;
131126

132127
if (enableSchedulerTracing) {
133128
this.interactionThreadID = unstable_getThreadID();
@@ -254,8 +249,6 @@ export function markRootFinishedAtTime(
254249
// Clear the expired time
255250
root.lastExpiredTime = NoWork;
256251
}
257-
258-
root.didError = false;
259252
}
260253

261254
export function markRootExpiredAtTime(

0 commit comments

Comments
 (0)