dillon1000/react

Commit

[Transition Tracing] Add transition to OffscreenState and pendingSuspenseBoundaries to RootState (#24340)

In this PR we:

Add transitions boilerplate to the OffscreenState. The transitions field will be null on initiation. During the commit phase, if there are any new transitions, we will add any new transitions (either as a result of a transition occurring or a parent suspense boundary completing) to the transitions field. Once the suspense boundary resolves, we no longer need to store the transitions on the boundary, so we can put this field on the Offscreen memoized state
Add pendingSuspenseBoundaries boilerplate to the RootState. This field starts as null. During the commit phase, if a suspense boundary has either gone from fallback to resolved or from resolved to fallback, we will create a new Map if there isn't one, and if there is, we will add (if the boundary is a fallback) or remove the suspense boundary (if the boundary has resolved) from the map.
Add an optional name field to the Suspense boundary
Browse files
Changed paths11 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberBeginWork.new.js ModifiedM packages/react-reconciler/src/ReactFiberBeginWork.old.js ModifiedM packages/react-reconciler/src/ReactFiberCommitWork.new.js ModifiedM packages/react-reconciler/src/ReactFiberCommitWork.old.js ModifiedM packages/react-reconciler/src/ReactFiberOffscreenComponent.js ModifiedM packages/react-reconciler/src/ReactFiberRoot.new.js ModifiedM packages/react-reconciler/src/ReactFiberRoot.old.js ModifiedM packages/react-reconciler/src/ReactFiberSuspenseComponent.new.js ModifiedM packages/react-reconciler/src/ReactFiberSuspenseComponent.old.js ModifiedM packages/react-reconciler/src/ReactFiberTracingMarkerComponent.new.js ModifiedM packages/react-reconciler/src/ReactFiberTracingMarkerComponent.old.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…