@@ -67,7 +67,6 @@ import {
67
67
DidCapture ,
68
68
Update ,
69
69
Ref ,
70
- Deletion ,
71
70
ChildDeletion ,
72
71
ForceUpdateForLegacySuspense ,
73
72
StaticMask ,
@@ -2199,10 +2198,6 @@ function updateSuspensePrimaryChildren(
2199
2198
primaryChildFragment . sibling = null ;
2200
2199
if ( currentFallbackChildFragment !== null ) {
2201
2200
// Delete the fallback child fragment
2202
- currentFallbackChildFragment . nextEffect = null ;
2203
- currentFallbackChildFragment . flags =
2204
- ( currentFallbackChildFragment . flags & StaticMask ) | Deletion ;
2205
- workInProgress . firstEffect = workInProgress . lastEffect = currentFallbackChildFragment ;
2206
2201
const deletions = workInProgress . deletions ;
2207
2202
if ( deletions === null ) {
2208
2203
workInProgress . deletions = [ currentFallbackChildFragment ] ;
@@ -2264,22 +2259,9 @@ function updateSuspenseFallbackChildren(
2264
2259
currentPrimaryChildFragment . treeBaseDuration ;
2265
2260
}
2266
2261
2267
- if ( currentFallbackChildFragment !== null ) {
2268
- // The fallback fiber was added as a deletion effect during the first
2269
- // pass. However, since we're going to remain on the fallback, we no
2270
- // longer want to delete it. So we need to remove it from the list.
2271
- // Deletions are stored on the same list as effects, and are always added
2272
- // to the front. So we know that the first effect must be the fallback
2273
- // deletion effect, and everything after that is from the primary free.
2274
- const firstPrimaryTreeEffect = currentFallbackChildFragment . nextEffect ;
2275
- if ( firstPrimaryTreeEffect !== null ) {
2276
- workInProgress . firstEffect = firstPrimaryTreeEffect ;
2277
- } else {
2278
- // TODO: Reset this somewhere else? Lol legacy mode is so weird.
2279
- workInProgress . firstEffect = workInProgress . lastEffect = null ;
2280
- }
2281
- }
2282
-
2262
+ // The fallback fiber was added as a deletion during the first pass.
2263
+ // However, since we're going to remain on the fallback, we no longer want
2264
+ // to delete it.
2283
2265
workInProgress . deletions = null ;
2284
2266
} else {
2285
2267
primaryChildFragment = createWorkInProgressOffscreenFiber (
@@ -2776,7 +2758,6 @@ function initSuspenseListRenderState(
2776
2758
tail : null | Fiber ,
2777
2759
lastContentRow : null | Fiber ,
2778
2760
tailMode : SuspenseListTailMode ,
2779
- lastEffectBeforeRendering : null | Fiber ,
2780
2761
) : void {
2781
2762
const renderState : null | SuspenseListRenderState =
2782
2763
workInProgress . memoizedState ;
@@ -2788,7 +2769,6 @@ function initSuspenseListRenderState(
2788
2769
last : lastContentRow ,
2789
2770
tail : tail ,
2790
2771
tailMode : tailMode ,
2791
- lastEffect : lastEffectBeforeRendering ,
2792
2772
} : SuspenseListRenderState ) ;
2793
2773
} else {
2794
2774
// We can reuse the existing object from previous renders.
@@ -2798,7 +2778,6 @@ function initSuspenseListRenderState(
2798
2778
renderState . last = lastContentRow ;
2799
2779
renderState . tail = tail ;
2800
2780
renderState . tailMode = tailMode ;
2801
- renderState . lastEffect = lastEffectBeforeRendering ;
2802
2781
}
2803
2782
}
2804
2783
@@ -2880,7 +2859,6 @@ function updateSuspenseListComponent(
2880
2859
tail ,
2881
2860
lastContentRow ,
2882
2861
tailMode ,
2883
- workInProgress . lastEffect ,
2884
2862
) ;
2885
2863
break ;
2886
2864
}
@@ -2912,7 +2890,6 @@ function updateSuspenseListComponent(
2912
2890
tail ,
2913
2891
null , // last
2914
2892
tailMode ,
2915
- workInProgress . lastEffect ,
2916
2893
) ;
2917
2894
break ;
2918
2895
}
@@ -2923,7 +2900,6 @@ function updateSuspenseListComponent(
2923
2900
null , // tail
2924
2901
null , // last
2925
2902
undefined ,
2926
- workInProgress . lastEffect ,
2927
2903
) ;
2928
2904
break ;
2929
2905
}
@@ -3183,16 +3159,6 @@ function remountFiber(
3183
3159
3184
3160
// Delete the old fiber and place the new one.
3185
3161
// Since the old fiber is disconnected, we have to schedule it manually.
3186
- const last = returnFiber . lastEffect ;
3187
- if ( last !== null ) {
3188
- last . nextEffect = current ;
3189
- returnFiber . lastEffect = current ;
3190
- } else {
3191
- returnFiber . firstEffect = returnFiber . lastEffect = current ;
3192
- }
3193
- current . nextEffect = null ;
3194
- current . flags = ( current . flags & StaticMask ) | Deletion ;
3195
-
3196
3162
const deletions = returnFiber . deletions ;
3197
3163
if ( deletions === null ) {
3198
3164
returnFiber . deletions = [ current ] ;
0 commit comments