@@ -35,7 +35,6 @@ import {
35
35
enableLegacyHidden ,
36
36
enableSuspenseCallback ,
37
37
enableScopeAPI ,
38
- enablePersistedModeClonedFlag ,
39
38
enableProfilerTimer ,
40
39
enableTransitionTracing ,
41
40
passChildrenWhenCloningPersistedNodes ,
@@ -205,7 +204,7 @@ function markUpdate(workInProgress: Fiber) {
205
204
* it received an update that requires a clone of the tree above.
206
205
*/
207
206
function markCloned ( workInProgress : Fiber ) {
208
- if ( supportsPersistence && enablePersistedModeClonedFlag ) {
207
+ if ( supportsPersistence ) {
209
208
workInProgress . flags |= Cloned ;
210
209
}
211
210
}
@@ -227,9 +226,7 @@ function doesRequireClone(current: null | Fiber, completedWork: Fiber) {
227
226
// then we only have to check the `completedWork.subtreeFlags`.
228
227
let child = completedWork . child ;
229
228
while ( child !== null ) {
230
- const checkedFlags = enablePersistedModeClonedFlag
231
- ? Cloned | Visibility | Placement | ChildDeletion
232
- : MutationMask ;
229
+ const checkedFlags = Cloned | Visibility | Placement | ChildDeletion ;
233
230
if (
234
231
( child . flags & checkedFlags ) !== NoFlags ||
235
232
( child . subtreeFlags & checkedFlags ) !== NoFlags
@@ -526,16 +523,9 @@ function updateHostComponent(
526
523
markUpdate ( workInProgress ) ;
527
524
}
528
525
workInProgress . stateNode = newInstance ;
529
- if ( ! requiresClone ) {
530
- if ( ! enablePersistedModeClonedFlag ) {
531
- // If there are no other effects in this tree, we need to flag this node as having one.
532
- // Even though we're not going to use it for anything.
533
- // Otherwise parents won't know that there are new children to propagate upwards.
534
- markUpdate ( workInProgress ) ;
535
- }
536
- } else if (
537
- ! passChildrenWhenCloningPersistedNodes ||
538
- hasOffscreenComponentChild
526
+ if (
527
+ requiresClone &&
528
+ ( ! passChildrenWhenCloningPersistedNodes || hasOffscreenComponentChild )
539
529
) {
540
530
// If children have changed, we have to add them all to the set.
541
531
appendAllChildren (
@@ -693,11 +683,6 @@ function updateHostText(
693
683
currentHostContext ,
694
684
workInProgress ,
695
685
) ;
696
- if ( ! enablePersistedModeClonedFlag ) {
697
- // We'll have to mark it as having an effect, even though we won't use the effect for anything.
698
- // This lets the parents know that at least one of their children has changed.
699
- markUpdate ( workInProgress ) ;
700
- }
701
686
} else {
702
687
workInProgress . stateNode = current . stateNode ;
703
688
}
0 commit comments