236
markSkippedUpdateLanes,
237
getWorkInProgressRoot,
238
pushRenderLanes,
239
- getWorkInProgressTransitions,
239
} from './ReactFiberWorkLoop.new';
240
import {setWorkInProgressVersion} from './ReactMutableSource.new';
241
import {pushCacheProvider, CacheContext} from './ReactFiberCacheComponent.new';
651
// Rendering a hidden tree.
652
if ((workInProgress.mode & ConcurrentMode) === NoMode) {
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
const nextState: OffscreenState = {
656
baseLanes: NoLanes,
657
cachePool: null,
658
+ transitions: null,
659
};
660
workInProgress.memoizedState = nextState;
661
if (enableCache) {
689
const nextState: OffscreenState = {
690
baseLanes: nextBaseLanes,
691
cachePool: spawnedCachePool,
692
+ transitions: null,
693
};
694
workInProgress.memoizedState = nextState;
695
workInProgress.updateQueue = null;
725
const nextState: OffscreenState = {
726
baseLanes: NoLanes,
727
cachePool: null,
728
+ transitions: null,
729
};
730
workInProgress.memoizedState = nextState;
731
// Push the lanes that were skipped when we bailed out.
1348
}
1349
}
1350
1348
- if (enableTransitionTracing) {
1349
- // FIXME: Slipped past code review. This is not a safe mutation:
1350
- // workInProgress.memoizedState is a shared object. Need to fix before
1351
- // rolling out the Transition Tracing experiment.
1352
- workInProgress.memoizedState.transitions = getWorkInProgressTransitions();
1353
- }
1354
-
1351
// Caution: React DevTools currently depends on this property
1352
// being called "element".
1353
const nextChildren = nextState.element;
1361
element: nextChildren,
1362
isDehydrated: false,
1363
cache: nextState.cache,
1364
+ pendingSuspenseBoundaries: nextState.pendingSuspenseBoundaries,
1365
transitions: nextState.transitions,
1366
};
1367
const updateQueue: UpdateQueue<RootState> = (workInProgress.updateQueue: any);
1979
return {
1980
baseLanes: renderLanes,
1981
cachePool: getSuspendedCache(),
1982
+ transitions: null,
1983
};
1984
}
1985
2014
return {
2015
baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes),
2016
cachePool,
2017
+ transitions: prevOffscreenState.transitions,
2018
};
2019
}
2020
3581
const cache: Cache = current.memoizedState.cache;
3582
pushCacheProvider(workInProgress, cache);
3583
}
3585
- if (enableTransitionTracing) {
3586
- workInProgress.memoizedState.transitions = getWorkInProgressTransitions();
3587
- }
3584
resetHydrationState();
3585
break;
3586
case HostComponent: