diff --git a/packages/react-reconciler/src/ReactFiber.new.js b/packages/react-reconciler/src/ReactFiber.new.js index 2401cd04cf3fd..fc9840538ca0e 100644 --- a/packages/react-reconciler/src/ReactFiber.new.js +++ b/packages/react-reconciler/src/ReactFiber.new.js @@ -24,6 +24,7 @@ import { enableStrictEffects, enableProfilerTimer, enableScopeAPI, + enableSyncDefaultUpdates, } from 'shared/ReactFeatureFlags'; import {NoFlags, Placement, StaticMask} from './ReactFiberFlags'; import {ConcurrentRoot} from './ReactRootTags'; @@ -442,8 +443,10 @@ export function createHostRootFiber( mode |= StrictLegacyMode; } } - if (concurrentUpdatesByDefaultOverride) { - mode |= ConcurrentUpdatesByDefaultMode; + if (enableSyncDefaultUpdates) { + if (concurrentUpdatesByDefaultOverride) { + mode |= ConcurrentUpdatesByDefaultMode; + } } } else { mode = NoMode; diff --git a/packages/react-reconciler/src/ReactFiber.old.js b/packages/react-reconciler/src/ReactFiber.old.js index 7228b33710b66..db25edba8811a 100644 --- a/packages/react-reconciler/src/ReactFiber.old.js +++ b/packages/react-reconciler/src/ReactFiber.old.js @@ -24,6 +24,7 @@ import { enableStrictEffects, enableProfilerTimer, enableScopeAPI, + enableSyncDefaultUpdates, } from 'shared/ReactFeatureFlags'; import {NoFlags, Placement, StaticMask} from './ReactFiberFlags'; import {ConcurrentRoot} from './ReactRootTags'; @@ -442,8 +443,10 @@ export function createHostRootFiber( mode |= StrictLegacyMode; } } - if (concurrentUpdatesByDefaultOverride) { - mode |= ConcurrentUpdatesByDefaultMode; + if (enableSyncDefaultUpdates) { + if (concurrentUpdatesByDefaultOverride) { + mode |= ConcurrentUpdatesByDefaultMode; + } } } else { mode = NoMode;