@@ -236,7 +236,6 @@ import {
236236 markSkippedUpdateLanes ,
237237 getWorkInProgressRoot ,
238238 pushRenderLanes ,
239- getWorkInProgressTransitions ,
240239} from './ReactFiberWorkLoop.old' ;
241240import { setWorkInProgressVersion } from './ReactMutableSource.old' ;
242241import { pushCacheProvider , CacheContext } from './ReactFiberCacheComponent.old' ;
@@ -652,9 +651,11 @@ function updateOffscreenComponent(
652651 // Rendering a hidden tree.
653652 if ( ( workInProgress . mode & ConcurrentMode ) === NoMode ) {
654653 // In legacy sync mode, don't defer the subtree. Render it now.
654+ // TODO: Consider how Offscreen should work with transitions in the future
655655 const nextState : OffscreenState = {
656656 baseLanes : NoLanes ,
657657 cachePool : null ,
658+ transitions : null ,
658659 } ;
659660 workInProgress . memoizedState = nextState ;
660661 if ( enableCache ) {
@@ -688,6 +689,7 @@ function updateOffscreenComponent(
688689 const nextState : OffscreenState = {
689690 baseLanes : nextBaseLanes ,
690691 cachePool : spawnedCachePool ,
692+ transitions : null ,
691693 } ;
692694 workInProgress . memoizedState = nextState ;
693695 workInProgress . updateQueue = null ;
@@ -723,6 +725,7 @@ function updateOffscreenComponent(
723725 const nextState : OffscreenState = {
724726 baseLanes : NoLanes ,
725727 cachePool : null ,
728+ transitions : null ,
726729 } ;
727730 workInProgress . memoizedState = nextState ;
728731 // Push the lanes that were skipped when we bailed out.
@@ -1343,13 +1346,6 @@ function updateHostRoot(current, workInProgress, renderLanes) {
13431346 }
13441347 }
13451348
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-
13531349 // Caution: React DevTools currently depends on this property
13541350 // being called "element".
13551351 const nextChildren = nextState . element ;
@@ -1363,6 +1359,7 @@ function updateHostRoot(current, workInProgress, renderLanes) {
13631359 element : nextChildren ,
13641360 isDehydrated : false ,
13651361 cache : nextState . cache ,
1362+ pendingSuspenseBoundaries : nextState . pendingSuspenseBoundaries ,
13661363 transitions : nextState . transitions ,
13671364 } ;
13681365 const updateQueue : UpdateQueue < RootState > = (workInProgress.updateQueue: any);
@@ -1980,6 +1977,7 @@ function mountSuspenseOffscreenState(renderLanes: Lanes): OffscreenState {
19801977 return {
19811978 baseLanes : renderLanes ,
19821979 cachePool : getSuspendedCache ( ) ,
1980+ transitions : null ,
19831981 } ;
19841982}
19851983
@@ -2014,6 +2012,7 @@ function updateSuspenseOffscreenState(
20142012 return {
20152013 baseLanes : mergeLanes ( prevOffscreenState . baseLanes , renderLanes ) ,
20162014 cachePool,
2015+ transitions : prevOffscreenState . transitions ,
20172016 } ;
20182017}
20192018
@@ -3580,9 +3579,6 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
35803579 const cache : Cache = current . memoizedState . cache ;
35813580 pushCacheProvider ( workInProgress , cache ) ;
35823581 }
3583- if ( enableTransitionTracing ) {
3584- workInProgress . memoizedState . transitions = getWorkInProgressTransitions ( ) ;
3585- }
35863582 resetHydrationState ( ) ;
35873583 break ;
35883584 case HostComponent :
0 commit comments