dillon1000/react

Commit

Refactor Update Queues to Fix Rebasing Bug

Fixes a bug related to rebasing updates. Once an update has committed,
it should never un-commit, even if interrupted by a higher priority
update. The fix includes a refactor of how update queues work.

This commit is a combination of two PRs:

- #17483 by @sebmarkbage refactors the hook update queue
- #17510 by @acdlite refactors the class and root update queue

Landing one without the other would cause state updates to sometimes be
inconsistent across components, so I've combined them into a single
commit in case they need to be reverted.

Co-authored-by: Sebastian Markbåge <[email protected]>
Co-authored-by: Andrew Clark <[email protected]>
Browse files
Changed paths5 files
First-parent comparison
M packages/react-noop-renderer/src/createReactNoop.js ModifiedM packages/react-reconciler/src/ReactFiberHooks.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-reconciler/src/ReactUpdateQueue.js ModifiedM packages/react-reconciler/src/__tests__/ReactIncrementalUpdates-test.internal.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…