-
Notifications
You must be signed in to change notification settings - Fork 47.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove Task priority The concept of Task priority was originally added as a way to avoid reentrancy. Sync priority is for work that flushes synchronously, and Task is for work that flushes at the end of the event loop. But it turns out that in most cases, it's simpler to model Task and Sync as the same priority level. For example, it's never correct to flush Sync work from the update queue without flushing Task. Doing so can lead to infinite update loops. And using a separate priority level is not necessary to avoid reentrancy. We already track when work is being rendered, and exit before entering the render cycle again. That alone is sufficient. This commit removes Task priority from the codebase. Now we use the same level for both truly synchronous work and work that is deferred until the end of the event loop. This also enables us to remove DOM-specific legacy cases from the reconciler and lift them to the renderer. * Remove isUnbatched from FiberRoot Simpler to render unbatched roots immediately. * Use a cyclic linked list for root schedule Avoids the need for a separate `isScheduled` field.
- Loading branch information
Showing
2 changed files
with
137 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters