Skip to content

Commit b408df5

Browse files
author
Brian Vaughn
committed
createRoot API is no longer strict by default
Support was left in place for defaulting a root into "strict effects mode" if the 'createRootStrictEffectsByDefault' feature flag is enabled, but this feature flag is only enabled within Facebook behind a GK.
1 parent 79740da commit b408df5

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

packages/react-reconciler/src/ReactFiber.new.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,6 @@ export function createHostRootFiber(
440440
} else {
441441
if (enableStrictEffects && createRootStrictEffectsByDefault) {
442442
mode |= StrictLegacyMode | StrictEffectsMode;
443-
} else {
444-
mode |= StrictLegacyMode;
445443
}
446444
}
447445
if (

packages/react-reconciler/src/ReactFiber.old.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,6 @@ export function createHostRootFiber(
440440
} else {
441441
if (enableStrictEffects && createRootStrictEffectsByDefault) {
442442
mode |= StrictLegacyMode | StrictEffectsMode;
443-
} else {
444-
mode |= StrictLegacyMode;
445443
}
446444
}
447445
if (

0 commit comments

Comments
 (0)