dillon1000/react
Commit
Browse files Apply pending updates in order of priority
The queue maintains a pointer to the last progressed update in the list. Updates that come after that pointer are pending. The pointer is set to the end of the list during reconciliation. Pending updates are sorted by priority then insertion. Progressed updates are sorted by the order in which they were applied during reconciliation, which may not be by priority: if a component bails out before the updates are committed, in the next render, the progressed updates are applied in the same order that they were previously, even if a higher priority update comes in. Once a progressed update is flushed/committed, it's removed from the queue.
Changed paths3 files
First-parent comparisonscripts/fiber/tests-passing.txt ModifiedM src/renderers/shared/fiber/ReactFiberUpdateQueue.js ModifiedA src/renderers/shared/fiber/__tests__/ReactIncrementalUpdates-test.js AddedPatch
Files changed
Rendering syntax-highlighted changes…