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