Clarify that the transitionLanes used by Transition Tracing is a LaneMap (#32800)

We have a high level concept for this used elsewhere.

We should use this for `transitionTypes` too:


https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactInternalTypes.js#L285

As mentioned in #32797 we could also just use the `transitionLanes`
since the `types` are also on the `Transition` objects. If we always
stored this set.
This commit is contained in:
Sebastian Markbåge 2025-04-01 18:18:33 -04:00 committed by GitHub
parent 7a728dffd1
commit 450f8df886
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 5 deletions

View File

@ -112,10 +112,7 @@ function FiberRootNode(
this.incompleteTransitions = new Map();
if (enableTransitionTracing) {
this.transitionCallbacks = null;
const transitionLanesMap = (this.transitionLanes = []);
for (let i = 0; i < TotalLanes; i++) {
transitionLanesMap.push(null);
}
this.transitionLanes = createLaneMap(null);
}
if (enableProfilerTimer && enableProfilerCommitHooks) {

View File

@ -357,7 +357,7 @@ export type TransitionTracingCallbacks = {
// The following fields are only used in transition tracing in Profile builds
type TransitionTracingOnlyFiberRootProperties = {
transitionCallbacks: null | TransitionTracingCallbacks,
transitionLanes: Array<Set<Transition> | null>,
transitionLanes: LaneMap<Set<Transition> | null>,
// Transitions on the root can be represented as a bunch of tracing markers.
// Each entangled group of transitions can be treated as a tracing marker.
// It will have a set of pending suspense boundaries. These transitions