@@ -35,7 +35,6 @@ import {
3535 enableLegacyHidden ,
3636 enableSuspenseCallback ,
3737 enableScopeAPI ,
38- enablePersistedModeClonedFlag ,
3938 enableProfilerTimer ,
4039 enableTransitionTracing ,
4140 passChildrenWhenCloningPersistedNodes ,
@@ -205,7 +204,7 @@ function markUpdate(workInProgress: Fiber) {
205204 * it received an update that requires a clone of the tree above.
206205 */
207206function markCloned ( workInProgress : Fiber ) {
208- if ( supportsPersistence && enablePersistedModeClonedFlag ) {
207+ if ( supportsPersistence ) {
209208 workInProgress . flags |= Cloned ;
210209 }
211210}
@@ -227,9 +226,7 @@ function doesRequireClone(current: null | Fiber, completedWork: Fiber) {
227226 // then we only have to check the `completedWork.subtreeFlags`.
228227 let child = completedWork . child ;
229228 while ( child !== null ) {
230- const checkedFlags = enablePersistedModeClonedFlag
231- ? Cloned | Visibility | Placement | ChildDeletion
232- : MutationMask ;
229+ const checkedFlags = Cloned | Visibility | Placement | ChildDeletion ;
233230 if (
234231 ( child . flags & checkedFlags ) !== NoFlags ||
235232 ( child . subtreeFlags & checkedFlags ) !== NoFlags
@@ -526,16 +523,9 @@ function updateHostComponent(
526523 markUpdate ( workInProgress ) ;
527524 }
528525 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 )
539529 ) {
540530 // If children have changed, we have to add them all to the set.
541531 appendAllChildren (
@@ -693,11 +683,6 @@ function updateHostText(
693683 currentHostContext ,
694684 workInProgress ,
695685 ) ;
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- }
701686 } else {
702687 workInProgress . stateNode = current . stateNode ;
703688 }
0 commit comments