dillon1000/react

Commit

[Transition Tracing] Fix excess calls to the transition start callback (#24806)

This PR fixes a bug where we would add a transition to the lanes map every time an update occurs. However, we didn't factor in that there might be multiple updates in a transition, which would cause the transition to be added multiple times to the transitionLanes map.

This changes the transitionLanes object from an Array of Arrays to an Array of Sets so that we only add a transition if it hasn't been added before, avoiding duplicates
Browse files
Changed paths4 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberLane.new.js ModifiedM packages/react-reconciler/src/ReactFiberLane.old.js ModifiedM packages/react-reconciler/src/ReactInternalTypes.js ModifiedM packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…