Skip to content

Commit

Permalink
Factor out render phase
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acdlite committed Feb 5, 2020
1 parent 010c09b commit acb551e
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 175 deletions.
7 changes: 0 additions & 7 deletions packages/react-reconciler/src/ReactFiberRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ type BaseFiberRootProperties = {|
// render again
lastPingedTime: ExpirationTime,
lastExpiredTime: ExpirationTime,

// Set to true when the root completes with an error. We'll try rendering
// again. This field ensures we don't retry more than once.
didError: boolean,
|};

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

if (enableSchedulerTracing) {
this.interactionThreadID = unstable_getThreadID();
Expand Down Expand Up @@ -254,8 +249,6 @@ export function markRootFinishedAtTime(
// Clear the expired time
root.lastExpiredTime = NoWork;
}

root.didError = false;
}

export function markRootExpiredAtTime(
Expand Down
Loading

0 comments on commit acb551e

Please sign in to comment.