Skip to content

Commit 78728a4

Browse files
author
Brian Vaughn
committed
Updated enableStrictEffects feature flag to be __DEV__
1 parent 69c226d commit 78728a4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/shared/ReactFeatureFlags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
2525

2626
// Helps identify code that is not safe for planned Offscreen API and Suspense semantics;
2727
// this feature flag only impacts StrictEffectsMode.
28-
export const enableStrictEffects = true;
28+
export const enableStrictEffects = __DEV__;
2929

3030
// If TRUE, trees rendered with createRoot will be StrictEffectsMode.
3131
// If FALSE, these trees will be StrictLegacyMode.

packages/shared/forks/ReactFeatureFlags.www.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export const {
2525
deferRenderPhaseUpdateToNextBatch,
2626
enableDebugTracing,
2727
skipUnmountedBoundaries,
28-
enableStrictEffects,
2928
createRootStrictEffectsByDefault,
3029
enableSuspenseLayoutEffectSemantics,
3130
enableUseRefAccessWarning,
@@ -39,6 +38,8 @@ export const {
3938
// On WWW, __EXPERIMENTAL__ is used for a new modern build.
4039
// It's not used anywhere in production yet.
4140

41+
export const enableStrictEffects =
42+
__DEV__ && dynamicFeatureFlags.enableStrictEffects;
4243
export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
4344
export const enableProfilerTimer = __PROFILE__;
4445
export const enableProfilerCommitHooks = __PROFILE__;

0 commit comments

Comments
 (0)