diff --git a/packages/react-reconciler/src/ReactFiber.new.js b/packages/react-reconciler/src/ReactFiber.new.js index f5da9baa7e276..dbd7678cc5626 100644 --- a/packages/react-reconciler/src/ReactFiber.new.js +++ b/packages/react-reconciler/src/ReactFiber.new.js @@ -30,7 +30,6 @@ import { import { createRootStrictEffectsByDefault, enableCache, - enableStrictEffects, enableProfilerTimer, enableScopeAPI, enableLegacyHidden, @@ -449,13 +448,7 @@ export function createHostRootFiber( let mode; if (tag === ConcurrentRoot) { mode = ConcurrentMode; - if (isStrictMode === true) { - mode |= StrictLegacyMode; - - if (enableStrictEffects) { - mode |= StrictEffectsMode; - } - } else if (enableStrictEffects && createRootStrictEffectsByDefault) { + if (isStrictMode === true || createRootStrictEffectsByDefault) { mode |= StrictLegacyMode | StrictEffectsMode; } if ( @@ -531,7 +524,7 @@ export function createFiberFromTypeAndProps( case REACT_STRICT_MODE_TYPE: fiberTag = Mode; mode |= StrictLegacyMode; - if (enableStrictEffects && (mode & ConcurrentMode) !== NoMode) { + if ((mode & ConcurrentMode) !== NoMode) { // Strict effects should never run on legacy roots mode |= StrictEffectsMode; } diff --git a/packages/react-reconciler/src/ReactFiber.old.js b/packages/react-reconciler/src/ReactFiber.old.js index b7ab182a59eb5..e2905bba29f6e 100644 --- a/packages/react-reconciler/src/ReactFiber.old.js +++ b/packages/react-reconciler/src/ReactFiber.old.js @@ -30,7 +30,6 @@ import { import { createRootStrictEffectsByDefault, enableCache, - enableStrictEffects, enableProfilerTimer, enableScopeAPI, enableLegacyHidden, @@ -449,13 +448,7 @@ export function createHostRootFiber( let mode; if (tag === ConcurrentRoot) { mode = ConcurrentMode; - if (isStrictMode === true) { - mode |= StrictLegacyMode; - - if (enableStrictEffects) { - mode |= StrictEffectsMode; - } - } else if (enableStrictEffects && createRootStrictEffectsByDefault) { + if (isStrictMode === true || createRootStrictEffectsByDefault) { mode |= StrictLegacyMode | StrictEffectsMode; } if ( @@ -531,7 +524,7 @@ export function createFiberFromTypeAndProps( case REACT_STRICT_MODE_TYPE: fiberTag = Mode; mode |= StrictLegacyMode; - if (enableStrictEffects && (mode & ConcurrentMode) !== NoMode) { + if ((mode & ConcurrentMode) !== NoMode) { // Strict effects should never run on legacy roots mode |= StrictEffectsMode; } diff --git a/packages/react-reconciler/src/ReactFiberClassComponent.new.js b/packages/react-reconciler/src/ReactFiberClassComponent.new.js index e71ce096e3f34..f04422856e368 100644 --- a/packages/react-reconciler/src/ReactFiberClassComponent.new.js +++ b/packages/react-reconciler/src/ReactFiberClassComponent.new.js @@ -26,7 +26,6 @@ import { enableSchedulingProfiler, warnAboutDeprecatedLifecycles, enableLazyContextPropagation, - enableStrictEffects, } from 'shared/ReactFeatureFlags'; import ReactStrictModeWarnings from './ReactStrictModeWarnings.new'; import {isMounted} from './ReactFiberTreeReflection'; @@ -908,11 +907,7 @@ function mountClassInstance( if (typeof instance.componentDidMount === 'function') { let fiberFlags: Flags = Update | LayoutStatic; - if ( - __DEV__ && - enableStrictEffects && - (workInProgress.mode & StrictEffectsMode) !== NoMode - ) { + if (__DEV__ && (workInProgress.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } workInProgress.flags |= fiberFlags; @@ -986,11 +981,7 @@ function resumeMountClassInstance( // effect even though we're bailing out, so that cWU/cDU are called. if (typeof instance.componentDidMount === 'function') { let fiberFlags: Flags = Update | LayoutStatic; - if ( - __DEV__ && - enableStrictEffects && - (workInProgress.mode & StrictEffectsMode) !== NoMode - ) { + if (__DEV__ && (workInProgress.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } workInProgress.flags |= fiberFlags; @@ -1037,11 +1028,7 @@ function resumeMountClassInstance( } if (typeof instance.componentDidMount === 'function') { let fiberFlags: Flags = Update | LayoutStatic; - if ( - __DEV__ && - enableStrictEffects && - (workInProgress.mode & StrictEffectsMode) !== NoMode - ) { + if (__DEV__ && (workInProgress.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } workInProgress.flags |= fiberFlags; @@ -1051,11 +1038,7 @@ function resumeMountClassInstance( // effect even though we're bailing out, so that cWU/cDU are called. if (typeof instance.componentDidMount === 'function') { let fiberFlags: Flags = Update | LayoutStatic; - if ( - __DEV__ && - enableStrictEffects && - (workInProgress.mode & StrictEffectsMode) !== NoMode - ) { + if (__DEV__ && (workInProgress.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } workInProgress.flags |= fiberFlags; diff --git a/packages/react-reconciler/src/ReactFiberClassComponent.old.js b/packages/react-reconciler/src/ReactFiberClassComponent.old.js index 9fd757eef9807..ffc7b542a6c19 100644 --- a/packages/react-reconciler/src/ReactFiberClassComponent.old.js +++ b/packages/react-reconciler/src/ReactFiberClassComponent.old.js @@ -26,7 +26,6 @@ import { enableSchedulingProfiler, warnAboutDeprecatedLifecycles, enableLazyContextPropagation, - enableStrictEffects, } from 'shared/ReactFeatureFlags'; import ReactStrictModeWarnings from './ReactStrictModeWarnings.old'; import {isMounted} from './ReactFiberTreeReflection'; @@ -908,11 +907,7 @@ function mountClassInstance( if (typeof instance.componentDidMount === 'function') { let fiberFlags: Flags = Update | LayoutStatic; - if ( - __DEV__ && - enableStrictEffects && - (workInProgress.mode & StrictEffectsMode) !== NoMode - ) { + if (__DEV__ && (workInProgress.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } workInProgress.flags |= fiberFlags; @@ -986,11 +981,7 @@ function resumeMountClassInstance( // effect even though we're bailing out, so that cWU/cDU are called. if (typeof instance.componentDidMount === 'function') { let fiberFlags: Flags = Update | LayoutStatic; - if ( - __DEV__ && - enableStrictEffects && - (workInProgress.mode & StrictEffectsMode) !== NoMode - ) { + if (__DEV__ && (workInProgress.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } workInProgress.flags |= fiberFlags; @@ -1037,11 +1028,7 @@ function resumeMountClassInstance( } if (typeof instance.componentDidMount === 'function') { let fiberFlags: Flags = Update | LayoutStatic; - if ( - __DEV__ && - enableStrictEffects && - (workInProgress.mode & StrictEffectsMode) !== NoMode - ) { + if (__DEV__ && (workInProgress.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } workInProgress.flags |= fiberFlags; @@ -1051,11 +1038,7 @@ function resumeMountClassInstance( // effect even though we're bailing out, so that cWU/cDU are called. if (typeof instance.componentDidMount === 'function') { let fiberFlags: Flags = Update | LayoutStatic; - if ( - __DEV__ && - enableStrictEffects && - (workInProgress.mode & StrictEffectsMode) !== NoMode - ) { + if (__DEV__ && (workInProgress.mode & StrictEffectsMode) !== NoMode) { fiberFlags |= MountLayoutDev; } workInProgress.flags |= fiberFlags; diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.new.js b/packages/react-reconciler/src/ReactFiberCommitWork.new.js index ca642dcd36021..ea8e0cf26354b 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.new.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.new.js @@ -54,7 +54,6 @@ import { enableCache, enableTransitionTracing, enableUseEventHook, - enableStrictEffects, enableFloat, enableLegacyHidden, enableHostSingletons, @@ -4350,7 +4349,7 @@ function commitPassiveUnmountInsideDeletedTreeOnFiber( } function invokeLayoutEffectMountInDEV(fiber: Fiber): void { - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { @@ -4378,7 +4377,7 @@ function invokeLayoutEffectMountInDEV(fiber: Fiber): void { } function invokePassiveEffectMountInDEV(fiber: Fiber): void { - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { @@ -4397,7 +4396,7 @@ function invokePassiveEffectMountInDEV(fiber: Fiber): void { } function invokeLayoutEffectUnmountInDEV(fiber: Fiber): void { - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { @@ -4427,7 +4426,7 @@ function invokeLayoutEffectUnmountInDEV(fiber: Fiber): void { } function invokePassiveEffectUnmountInDEV(fiber: Fiber): void { - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.old.js b/packages/react-reconciler/src/ReactFiberCommitWork.old.js index 6ba8457290910..b33a051ee09d0 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.old.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.old.js @@ -54,7 +54,6 @@ import { enableCache, enableTransitionTracing, enableUseEventHook, - enableStrictEffects, enableFloat, enableLegacyHidden, enableHostSingletons, @@ -4350,7 +4349,7 @@ function commitPassiveUnmountInsideDeletedTreeOnFiber( } function invokeLayoutEffectMountInDEV(fiber: Fiber): void { - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { @@ -4378,7 +4377,7 @@ function invokeLayoutEffectMountInDEV(fiber: Fiber): void { } function invokePassiveEffectMountInDEV(fiber: Fiber): void { - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { @@ -4397,7 +4396,7 @@ function invokePassiveEffectMountInDEV(fiber: Fiber): void { } function invokeLayoutEffectUnmountInDEV(fiber: Fiber): void { - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { @@ -4427,7 +4426,7 @@ function invokeLayoutEffectUnmountInDEV(fiber: Fiber): void { } function invokePassiveEffectUnmountInDEV(fiber: Fiber): void { - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { // We don't need to re-check StrictEffectsMode here. // This function is only called if that check has already passed. switch (fiber.tag) { diff --git a/packages/react-reconciler/src/ReactFiberHooks.new.js b/packages/react-reconciler/src/ReactFiberHooks.new.js index 244c0f77c6ed6..8183ddd1557c0 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.new.js +++ b/packages/react-reconciler/src/ReactFiberHooks.new.js @@ -41,7 +41,6 @@ import { enableUseHook, enableUseMemoCacheHook, enableUseEventHook, - enableStrictEffects, } from 'shared/ReactFeatureFlags'; import { REACT_CONTEXT_TYPE, @@ -602,11 +601,7 @@ export function bailoutHooks( workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the // complete phase (bubbleProperties). - if ( - __DEV__ && - enableStrictEffects && - (workInProgress.mode & StrictEffectsMode) !== NoMode - ) { + if (__DEV__ && (workInProgress.mode & StrictEffectsMode) !== NoMode) { workInProgress.flags &= ~( MountPassiveDevEffect | MountLayoutDevEffect | @@ -1888,7 +1883,6 @@ function mountEffect( ): void { if ( __DEV__ && - enableStrictEffects && (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode ) { return mountEffectImpl( @@ -1984,7 +1978,6 @@ function mountLayoutEffect( let fiberFlags: Flags = UpdateEffect | LayoutStaticEffect; if ( __DEV__ && - enableStrictEffects && (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode ) { fiberFlags |= MountLayoutDevEffect; @@ -2051,7 +2044,6 @@ function mountImperativeHandle( let fiberFlags: Flags = UpdateEffect | LayoutStaticEffect; if ( __DEV__ && - enableStrictEffects && (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode ) { fiberFlags |= MountLayoutDevEffect; diff --git a/packages/react-reconciler/src/ReactFiberHooks.old.js b/packages/react-reconciler/src/ReactFiberHooks.old.js index 283e9daedd046..97aa7dcd4a41a 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.old.js +++ b/packages/react-reconciler/src/ReactFiberHooks.old.js @@ -41,7 +41,6 @@ import { enableUseHook, enableUseMemoCacheHook, enableUseEventHook, - enableStrictEffects, } from 'shared/ReactFeatureFlags'; import { REACT_CONTEXT_TYPE, @@ -602,11 +601,7 @@ export function bailoutHooks( workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the // complete phase (bubbleProperties). - if ( - __DEV__ && - enableStrictEffects && - (workInProgress.mode & StrictEffectsMode) !== NoMode - ) { + if (__DEV__ && (workInProgress.mode & StrictEffectsMode) !== NoMode) { workInProgress.flags &= ~( MountPassiveDevEffect | MountLayoutDevEffect | @@ -1888,7 +1883,6 @@ function mountEffect( ): void { if ( __DEV__ && - enableStrictEffects && (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode ) { return mountEffectImpl( @@ -1984,7 +1978,6 @@ function mountLayoutEffect( let fiberFlags: Flags = UpdateEffect | LayoutStaticEffect; if ( __DEV__ && - enableStrictEffects && (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode ) { fiberFlags |= MountLayoutDevEffect; @@ -2051,7 +2044,6 @@ function mountImperativeHandle( let fiberFlags: Flags = UpdateEffect | LayoutStaticEffect; if ( __DEV__ && - enableStrictEffects && (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode ) { fiberFlags |= MountLayoutDevEffect; diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js index c980402c30b43..cc2f1af4af59d 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js @@ -35,7 +35,6 @@ import { enableDebugTracing, enableSchedulingProfiler, disableSchedulerTimeoutInWorkLoop, - enableStrictEffects, skipUnmountedBoundaries, enableUpdaterTracking, enableCache, @@ -2610,7 +2609,7 @@ function commitRootImpl( legacyErrorBoundariesThatAlreadyFailed = null; } - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { if (!rootDidHavePassiveEffects) { commitDoubleInvokeEffectsInDEV(root, false); } @@ -2887,7 +2886,7 @@ function flushPassiveEffectsImpl() { markPassiveEffectsStopped(); } - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { commitDoubleInvokeEffectsInDEV(root, true); } @@ -3356,7 +3355,7 @@ function commitDoubleInvokeEffectsInDEV( root: FiberRoot, hasPassiveEffects: boolean, ) { - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { if (useModernStrictMode) { let doubleInvokeEffects = true; diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js index 72b520b8e18a1..8c15823869d77 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js @@ -35,7 +35,6 @@ import { enableDebugTracing, enableSchedulingProfiler, disableSchedulerTimeoutInWorkLoop, - enableStrictEffects, skipUnmountedBoundaries, enableUpdaterTracking, enableCache, @@ -2610,7 +2609,7 @@ function commitRootImpl( legacyErrorBoundariesThatAlreadyFailed = null; } - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { if (!rootDidHavePassiveEffects) { commitDoubleInvokeEffectsInDEV(root, false); } @@ -2887,7 +2886,7 @@ function flushPassiveEffectsImpl() { markPassiveEffectsStopped(); } - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { commitDoubleInvokeEffectsInDEV(root, true); } @@ -3356,7 +3355,7 @@ function commitDoubleInvokeEffectsInDEV( root: FiberRoot, hasPassiveEffects: boolean, ) { - if (__DEV__ && enableStrictEffects) { + if (__DEV__) { if (useModernStrictMode) { let doubleInvokeEffects = true; diff --git a/packages/react-reconciler/src/__tests__/ReactOffscreenStrictMode-test.js b/packages/react-reconciler/src/__tests__/ReactOffscreenStrictMode-test.js index 0771e596d9111..a3f45d8aa1ac6 100644 --- a/packages/react-reconciler/src/__tests__/ReactOffscreenStrictMode-test.js +++ b/packages/react-reconciler/src/__tests__/ReactOffscreenStrictMode-test.js @@ -31,7 +31,7 @@ describe('ReactOffscreenStrictMode', () => { return label; } - // @gate __DEV__ && enableStrictEffects && enableOffscreen + // @gate __DEV__ && enableOffscreen it('should trigger strict effects when offscreen is visible', () => { act(() => { ReactNoop.render( @@ -55,7 +55,7 @@ describe('ReactOffscreenStrictMode', () => { ]); }); - // @gate __DEV__ && enableStrictEffects && enableOffscreen && useModernStrictMode + // @gate __DEV__ && enableOffscreen && useModernStrictMode it('should not trigger strict effects when offscreen is hidden', () => { act(() => { ReactNoop.render( @@ -154,7 +154,7 @@ describe('ReactOffscreenStrictMode', () => { }); }); - // @gate __DEV__ && enableStrictEffects && enableOffscreen + // @gate __DEV__ && enableOffscreen it('should double invoke effects on unsuspended child', async () => { let shouldSuspend = true; let resolve; diff --git a/packages/react-reconciler/src/__tests__/StrictEffectsMode-test.js b/packages/react-reconciler/src/__tests__/StrictEffectsMode-test.js index 072addc637a72..aceb7d05d2d1e 100644 --- a/packages/react-reconciler/src/__tests__/StrictEffectsMode-test.js +++ b/packages/react-reconciler/src/__tests__/StrictEffectsMode-test.js @@ -27,7 +27,6 @@ describe('StrictEffectsMode', () => { return gate( flags => flags.build === 'development' && - flags.enableStrictEffects && flags.createRootStrictEffectsByDefault && flags.dfsEffectsRefactor, ); diff --git a/packages/react-reconciler/src/__tests__/StrictEffectsModeDefaults-test.internal.js b/packages/react-reconciler/src/__tests__/StrictEffectsModeDefaults-test.internal.js index 6fda4fe1314cb..7a7603d3d9283 100644 --- a/packages/react-reconciler/src/__tests__/StrictEffectsModeDefaults-test.internal.js +++ b/packages/react-reconciler/src/__tests__/StrictEffectsModeDefaults-test.internal.js @@ -24,7 +24,6 @@ describe('StrictEffectsMode defaults', () => { act = require('jest-react').act; const ReactFeatureFlags = require('shared/ReactFeatureFlags'); - ReactFeatureFlags.enableStrictEffects = __DEV__; ReactFeatureFlags.createRootStrictEffectsByDefault = __DEV__; }); diff --git a/packages/react/src/__tests__/ReactStrictMode-test.internal.js b/packages/react/src/__tests__/ReactStrictMode-test.internal.js index 35627e2793701..9661d0f72e35d 100644 --- a/packages/react/src/__tests__/ReactStrictMode-test.internal.js +++ b/packages/react/src/__tests__/ReactStrictMode-test.internal.js @@ -20,9 +20,6 @@ describe('ReactStrictMode', () => { ReactDOMClient = require('react-dom/client'); act = require('jest-react').act; - - const ReactFeatureFlags = require('shared/ReactFeatureFlags'); - ReactFeatureFlags.enableStrictEffects = __DEV__; }); describe('levels', () => { diff --git a/packages/shared/ReactFeatureFlags.js b/packages/shared/ReactFeatureFlags.js index 59122193ab10d..9caa256a1449c 100644 --- a/packages/shared/ReactFeatureFlags.js +++ b/packages/shared/ReactFeatureFlags.js @@ -229,10 +229,6 @@ export const enableSchedulingProfiler = __PROFILE__; // reducers by double invoking them in StrictLegacyMode. export const debugRenderPhaseSideEffectsForStrictMode = __DEV__; -// Helps identify code that is not safe for planned Offscreen API and Suspense semantics; -// this feature flag only impacts StrictEffectsMode. -export const enableStrictEffects = __DEV__; - // To preserve the "Pause on caught exceptions" behavior of the debugger, we // replay the begin phase of a failed component inside invokeGuardedCallback. export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__; diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb.js b/packages/shared/forks/ReactFeatureFlags.native-fb.js index 2c31bb577c707..c122058bc7455 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb.js @@ -65,7 +65,6 @@ export const enableGetInspectorDataForInstanceInProduction = true; export const enableNewReconciler = false; export const deferRenderPhaseUpdateToNextBatch = false; -export const enableStrictEffects = __DEV__; export const createRootStrictEffectsByDefault = false; export const disableSchedulerTimeoutInWorkLoop = false; diff --git a/packages/shared/forks/ReactFeatureFlags.native-oss.js b/packages/shared/forks/ReactFeatureFlags.native-oss.js index 56fb6dd20b9fe..84b51658e920a 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-oss.js +++ b/packages/shared/forks/ReactFeatureFlags.native-oss.js @@ -55,7 +55,6 @@ export const enableGetInspectorDataForInstanceInProduction = false; export const enableNewReconciler = false; export const deferRenderPhaseUpdateToNextBatch = false; -export const enableStrictEffects = false; export const createRootStrictEffectsByDefault = false; export const enableUseRefAccessWarning = false; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.js index b909a05fd79b2..ae53daa68d190 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.js @@ -55,7 +55,6 @@ export const enableGetInspectorDataForInstanceInProduction = false; export const enableNewReconciler = false; export const deferRenderPhaseUpdateToNextBatch = false; -export const enableStrictEffects = false; export const createRootStrictEffectsByDefault = false; export const enableUseRefAccessWarning = false; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js index 309a9a5acdf8e..656bf8961d61e 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js @@ -54,7 +54,6 @@ export const enableUseMemoCacheHook = false; export const enableUseEventHook = false; export const enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay = true; export const enableClientRenderFallbackOnTextMismatch = true; -export const enableStrictEffects = false; export const createRootStrictEffectsByDefault = false; export const enableUseRefAccessWarning = false; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js index 21c525917462a..0b35db3a8ea55 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js @@ -55,7 +55,6 @@ export const enableGetInspectorDataForInstanceInProduction = false; export const enableNewReconciler = false; export const deferRenderPhaseUpdateToNextBatch = false; -export const enableStrictEffects = true; export const createRootStrictEffectsByDefault = false; export const enableUseRefAccessWarning = false; diff --git a/packages/shared/forks/ReactFeatureFlags.testing.js b/packages/shared/forks/ReactFeatureFlags.testing.js index 0252698dbad45..e471b432f8fe3 100644 --- a/packages/shared/forks/ReactFeatureFlags.testing.js +++ b/packages/shared/forks/ReactFeatureFlags.testing.js @@ -55,7 +55,6 @@ export const enableGetInspectorDataForInstanceInProduction = false; export const enableNewReconciler = false; export const deferRenderPhaseUpdateToNextBatch = false; -export const enableStrictEffects = false; export const createRootStrictEffectsByDefault = false; export const enableUseRefAccessWarning = false; diff --git a/packages/shared/forks/ReactFeatureFlags.testing.www.js b/packages/shared/forks/ReactFeatureFlags.testing.www.js index 4fdd8577871d1..f41249dad84cc 100644 --- a/packages/shared/forks/ReactFeatureFlags.testing.www.js +++ b/packages/shared/forks/ReactFeatureFlags.testing.www.js @@ -55,7 +55,6 @@ export const enableGetInspectorDataForInstanceInProduction = false; export const enableNewReconciler = false; export const deferRenderPhaseUpdateToNextBatch = false; -export const enableStrictEffects = false; export const createRootStrictEffectsByDefault = false; export const enableUseRefAccessWarning = false; diff --git a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js index c08abf443fec1..882871de6f507 100644 --- a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js @@ -57,7 +57,6 @@ export const enableTrustedTypesIntegration = false; export const disableSchedulerTimeoutBasedOnReactExpirationTime = false; export const disableNativeComponentFrames = false; export const createRootStrictEffectsByDefault = false; -export const enableStrictEffects = false; export const allowConcurrentByDefault = true; // You probably *don't* want to add more hardcoded ones. // Instead, try to add them above with the __VARIANT__ value. diff --git a/packages/shared/forks/ReactFeatureFlags.www.js b/packages/shared/forks/ReactFeatureFlags.www.js index 33f94ae63da40..92739ff777b3c 100644 --- a/packages/shared/forks/ReactFeatureFlags.www.js +++ b/packages/shared/forks/ReactFeatureFlags.www.js @@ -39,8 +39,6 @@ export const { // On WWW, __EXPERIMENTAL__ is used for a new modern build. // It's not used anywhere in production yet. -export const enableStrictEffects: boolean = - __DEV__ && dynamicFeatureFlags.enableStrictEffects; export const debugRenderPhaseSideEffectsForStrictMode = __DEV__; export const enableProfilerTimer = __PROFILE__; export const enableProfilerCommitHooks = __PROFILE__;