@@ -236,7 +236,6 @@ import {
236
236
markSkippedUpdateLanes ,
237
237
getWorkInProgressRoot ,
238
238
pushRenderLanes ,
239
- getWorkInProgressTransitions ,
240
239
} from './ReactFiberWorkLoop.old' ;
241
240
import { setWorkInProgressVersion } from './ReactMutableSource.old' ;
242
241
import { pushCacheProvider , CacheContext } from './ReactFiberCacheComponent.old' ;
@@ -652,9 +651,11 @@ function updateOffscreenComponent(
652
651
// Rendering a hidden tree.
653
652
if ( ( workInProgress . mode & ConcurrentMode ) === NoMode ) {
654
653
// In legacy sync mode, don't defer the subtree. Render it now.
654
+ // TODO: Consider how Offscreen should work with transitions in the future
655
655
const nextState : OffscreenState = {
656
656
baseLanes : NoLanes ,
657
657
cachePool : null ,
658
+ transitions : null ,
658
659
} ;
659
660
workInProgress . memoizedState = nextState ;
660
661
if ( enableCache ) {
@@ -688,6 +689,7 @@ function updateOffscreenComponent(
688
689
const nextState : OffscreenState = {
689
690
baseLanes : nextBaseLanes ,
690
691
cachePool : spawnedCachePool ,
692
+ transitions : null ,
691
693
} ;
692
694
workInProgress . memoizedState = nextState ;
693
695
workInProgress . updateQueue = null ;
@@ -723,6 +725,7 @@ function updateOffscreenComponent(
723
725
const nextState : OffscreenState = {
724
726
baseLanes : NoLanes ,
725
727
cachePool : null ,
728
+ transitions : null ,
726
729
} ;
727
730
workInProgress . memoizedState = nextState ;
728
731
// Push the lanes that were skipped when we bailed out.
@@ -1343,13 +1346,6 @@ function updateHostRoot(current, workInProgress, renderLanes) {
1343
1346
}
1344
1347
}
1345
1348
1346
- if ( enableTransitionTracing ) {
1347
- // FIXME: Slipped past code review. This is not a safe mutation:
1348
- // workInProgress.memoizedState is a shared object. Need to fix before
1349
- // rolling out the Transition Tracing experiment.
1350
- workInProgress . memoizedState . transitions = getWorkInProgressTransitions ( ) ;
1351
- }
1352
-
1353
1349
// Caution: React DevTools currently depends on this property
1354
1350
// being called "element".
1355
1351
const nextChildren = nextState . element ;
@@ -1363,6 +1359,7 @@ function updateHostRoot(current, workInProgress, renderLanes) {
1363
1359
element : nextChildren ,
1364
1360
isDehydrated : false ,
1365
1361
cache : nextState . cache ,
1362
+ pendingSuspenseBoundaries : nextState . pendingSuspenseBoundaries ,
1366
1363
transitions : nextState . transitions ,
1367
1364
} ;
1368
1365
const updateQueue : UpdateQueue < RootState > = (workInProgress.updateQueue: any);
@@ -1980,6 +1977,7 @@ function mountSuspenseOffscreenState(renderLanes: Lanes): OffscreenState {
1980
1977
return {
1981
1978
baseLanes : renderLanes ,
1982
1979
cachePool : getSuspendedCache ( ) ,
1980
+ transitions : null ,
1983
1981
} ;
1984
1982
}
1985
1983
@@ -2014,6 +2012,7 @@ function updateSuspenseOffscreenState(
2014
2012
return {
2015
2013
baseLanes : mergeLanes ( prevOffscreenState . baseLanes , renderLanes ) ,
2016
2014
cachePool,
2015
+ transitions : prevOffscreenState . transitions ,
2017
2016
} ;
2018
2017
}
2019
2018
@@ -3580,9 +3579,6 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
3580
3579
const cache : Cache = current . memoizedState . cache ;
3581
3580
pushCacheProvider ( workInProgress , cache ) ;
3582
3581
}
3583
- if ( enableTransitionTracing ) {
3584
- workInProgress . memoizedState . transitions = getWorkInProgressTransitions ( ) ;
3585
- }
3586
3582
resetHydrationState ( ) ;
3587
3583
break ;
3588
3584
case HostComponent :
0 commit comments