dillon1000/react

Commit

[Transition Tracing] Add onTransitionProgress Callback (#24833)

This PR adds support for `onTransitionProgress` (`onTransitionProgress(transitionName: string, startTime: number, currentTime: number, pending: Array<{name: null | string}>)`)

We call this callback when:
    * When **a child suspense boundary of the transition commits in a fallback state**. Only the suspense boundaries that are triggered and commit in a fallback state when the transition first occurs (and all subsequent suspense boundaries in the initial suspense boundary's subtree) are considered a part of the transition
    * **A child suspense boundary of the transition resolves**
   
When we call `onTransitionProgress`, we call the function with a `pending` array. This array contains the names of the transition's suspense boundaries that are still in a fallback state
Browse files
Changed paths8 files
First-parent comparison
M 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/ReactFiberTracingMarkerComponent.new.js ModifiedM packages/react-reconciler/src/ReactFiberTracingMarkerComponent.old.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.new.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.old.js ModifiedM packages/react-reconciler/src/__tests__/ReactTransitionTracing-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…