@@ -67,7 +67,6 @@ import {
6767 DidCapture ,
6868 Update ,
6969 Ref ,
70- Deletion ,
7170 ChildDeletion ,
7271 ForceUpdateForLegacySuspense ,
7372 StaticMask ,
@@ -2199,10 +2198,6 @@ function updateSuspensePrimaryChildren(
21992198 primaryChildFragment . sibling = null ;
22002199 if ( currentFallbackChildFragment !== null ) {
22012200 // Delete the fallback child fragment
2202- currentFallbackChildFragment . nextEffect = null ;
2203- currentFallbackChildFragment . flags =
2204- ( currentFallbackChildFragment . flags & StaticMask ) | Deletion ;
2205- workInProgress . firstEffect = workInProgress . lastEffect = currentFallbackChildFragment ;
22062201 const deletions = workInProgress . deletions ;
22072202 if ( deletions === null ) {
22082203 workInProgress . deletions = [ currentFallbackChildFragment ] ;
@@ -2264,22 +2259,9 @@ function updateSuspenseFallbackChildren(
22642259 currentPrimaryChildFragment . treeBaseDuration ;
22652260 }
22662261
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.
22832265 workInProgress . deletions = null ;
22842266 } else {
22852267 primaryChildFragment = createWorkInProgressOffscreenFiber (
@@ -2776,7 +2758,6 @@ function initSuspenseListRenderState(
27762758 tail : null | Fiber ,
27772759 lastContentRow : null | Fiber ,
27782760 tailMode : SuspenseListTailMode ,
2779- lastEffectBeforeRendering : null | Fiber ,
27802761) : void {
27812762 const renderState : null | SuspenseListRenderState =
27822763 workInProgress . memoizedState ;
@@ -2788,7 +2769,6 @@ function initSuspenseListRenderState(
27882769 last : lastContentRow ,
27892770 tail : tail ,
27902771 tailMode : tailMode ,
2791- lastEffect : lastEffectBeforeRendering ,
27922772 } : SuspenseListRenderState ) ;
27932773 } else {
27942774 // We can reuse the existing object from previous renders.
@@ -2798,7 +2778,6 @@ function initSuspenseListRenderState(
27982778 renderState . last = lastContentRow ;
27992779 renderState . tail = tail ;
28002780 renderState . tailMode = tailMode ;
2801- renderState . lastEffect = lastEffectBeforeRendering ;
28022781 }
28032782}
28042783
@@ -2880,7 +2859,6 @@ function updateSuspenseListComponent(
28802859 tail ,
28812860 lastContentRow ,
28822861 tailMode ,
2883- workInProgress . lastEffect ,
28842862 ) ;
28852863 break ;
28862864 }
@@ -2912,7 +2890,6 @@ function updateSuspenseListComponent(
29122890 tail ,
29132891 null , // last
29142892 tailMode ,
2915- workInProgress . lastEffect ,
29162893 ) ;
29172894 break ;
29182895 }
@@ -2923,7 +2900,6 @@ function updateSuspenseListComponent(
29232900 null , // tail
29242901 null , // last
29252902 undefined ,
2926- workInProgress . lastEffect ,
29272903 ) ;
29282904 break ;
29292905 }
@@ -3183,16 +3159,6 @@ function remountFiber(
31833159
31843160 // Delete the old fiber and place the new one.
31853161 // 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-
31963162 const deletions = returnFiber . deletions ;
31973163 if ( deletions === null ) {
31983164 returnFiber . deletions = [ current ] ;
0 commit comments