Skip to content

Commit

Permalink
Updated enableStrictEffects feature flag to be __DEV__
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Jun 1, 2021
1 parent 69c226d commit 78728a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/shared/ReactFeatureFlags.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ 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 = true;
export const enableStrictEffects = __DEV__;

// If TRUE, trees rendered with createRoot will be StrictEffectsMode.
// If FALSE, these trees will be StrictLegacyMode.
Expand Down
3 changes: 2 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const {
deferRenderPhaseUpdateToNextBatch,
enableDebugTracing,
skipUnmountedBoundaries,
enableStrictEffects,
createRootStrictEffectsByDefault,
enableSuspenseLayoutEffectSemantics,
enableUseRefAccessWarning,
Expand All @@ -39,6 +38,8 @@ export const {
// On WWW, __EXPERIMENTAL__ is used for a new modern build.
// It's not used anywhere in production yet.

export const enableStrictEffects =
__DEV__ && dynamicFeatureFlags.enableStrictEffects;
export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
export const enableProfilerTimer = __PROFILE__;
export const enableProfilerCommitHooks = __PROFILE__;
Expand Down

0 comments on commit 78728a4

Please sign in to comment.