dillon1000/react
Commit
Browse files [Bugfix] Prevent already-committed setState callback from firing again during a rebase (#21498)
* Failing test: Class callback fired multiple times Happens during a rebase (low priority update followed by high priority update). The high priority callback gets fired twice. * Prevent setState callback firing during rebase Before enqueueing the effect, adds a guard to check if the update was already committed.
Changed paths3 files
First-parent comparisonpackages/react-reconciler/src/ReactUpdateQueue.new.js ModifiedM packages/react-reconciler/src/ReactUpdateQueue.old.js ModifiedA packages/react-reconciler/src/__tests__/ReactClassSetStateCallback-test.js AddedPatch
Files changed
Rendering syntax-highlighted changes…