@@ -26,6 +26,7 @@ import type {SuspenseContext} from './ReactFiberSuspenseContext.old';
26
26
import type {
27
27
OffscreenProps ,
28
28
OffscreenState ,
29
+ OffscreenQueue ,
29
30
} from './ReactFiberOffscreenComponent' ;
30
31
import type {
31
32
Cache ,
@@ -256,6 +257,7 @@ import {
256
257
getSuspendedCache ,
257
258
pushTransition ,
258
259
getOffscreenDeferredCache ,
260
+ getSuspendedTransitions ,
259
261
} from './ReactFiberTransition.old' ;
260
262
261
263
const ReactCurrentOwner = ReactSharedInternals . ReactCurrentOwner ;
@@ -2160,6 +2162,16 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
2160
2162
renderLanes ,
2161
2163
) ;
2162
2164
workInProgress . memoizedState = SUSPENDED_MARKER ;
2165
+ if ( enableTransitionTracing ) {
2166
+ const currentTransitions = getSuspendedTransitions ( ) ;
2167
+ if ( currentTransitions !== null ) {
2168
+ const primaryChildUpdateQueue : OffscreenQueue = {
2169
+ transitions : currentTransitions ,
2170
+ } ;
2171
+ primaryChildFragment . updateQueue = primaryChildUpdateQueue ;
2172
+ }
2173
+ }
2174
+
2163
2175
return fallbackFragment ;
2164
2176
} else if (
2165
2177
enableCPUSuspense &&
@@ -2280,6 +2292,15 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
2280
2292
prevOffscreenState === null
2281
2293
? mountSuspenseOffscreenState ( renderLanes )
2282
2294
: updateSuspenseOffscreenState ( prevOffscreenState , renderLanes ) ;
2295
+ if ( enableTransitionTracing ) {
2296
+ const currentTransitions = getSuspendedTransitions ( ) ;
2297
+ if ( currentTransitions !== null ) {
2298
+ const primaryChildUpdateQueue : OffscreenQueue = {
2299
+ transitions : currentTransitions ,
2300
+ } ;
2301
+ primaryChildFragment . updateQueue = primaryChildUpdateQueue ;
2302
+ }
2303
+ }
2283
2304
primaryChildFragment . childLanes = getRemainingWorkInPrimaryTree (
2284
2305
current ,
2285
2306
renderLanes ,
@@ -2321,6 +2342,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
2321
2342
current ,
2322
2343
renderLanes ,
2323
2344
) ;
2345
+
2346
+ if ( enableTransitionTracing ) {
2347
+ const currentTransitions = getSuspendedTransitions ( ) ;
2348
+ if ( currentTransitions !== null ) {
2349
+ const primaryChildUpdateQueue : OffscreenQueue = {
2350
+ transitions : currentTransitions ,
2351
+ } ;
2352
+ primaryChildFragment . updateQueue = primaryChildUpdateQueue ;
2353
+ }
2354
+ }
2355
+
2324
2356
// Skip the primary children, and continue working on the
2325
2357
// fallback children.
2326
2358
workInProgress . memoizedState = SUSPENDED_MARKER ;
0 commit comments