File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -1191,6 +1191,15 @@ function completeWork(
11911191 }
11921192 }
11931193
1194+ // If the suspended state of the boundary changes, we need to schedule
1195+ // a passive effect, which is when we process the transitions
1196+ if ( nextDidTimeout !== prevDidTimeout ) {
1197+ if ( enableTransitionTracing ) {
1198+ const offscreenFiber : Fiber = ( workInProgress . child : any ) ;
1199+ offscreenFiber . flags |= Passive ;
1200+ }
1201+ }
1202+
11941203 // If the suspended state of the boundary changes, we need to schedule
11951204 // an effect to toggle the subtree's visibility. When we switch from
11961205 // fallback -> primary, the inner Offscreen fiber schedules this effect
@@ -1206,12 +1215,6 @@ function completeWork(
12061215 const offscreenFiber : Fiber = ( workInProgress . child : any ) ;
12071216 offscreenFiber . flags |= Visibility ;
12081217
1209- // If the suspended state of the boundary changes, we need to schedule
1210- // a passive effect, which is when we process the transitions
1211- if ( enableTransitionTracing ) {
1212- offscreenFiber . flags |= Passive ;
1213- }
1214-
12151218 // TODO: This will still suspend a synchronous tree if anything
12161219 // in the concurrent tree already suspended during this render.
12171220 // This is a known bug.
You can’t perform that action at this time.
0 commit comments