Skip to content

Commit

Permalink
OSS feature flag updates (#21597)
Browse files Browse the repository at this point in the history
Co-authored-by: Dan Abramov <dan.abramov@me.com>
  • Loading branch information
Brian Vaughn and gaearon committed Jun 1, 2021
1 parent efbd69b commit 6309193
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/shared/ReactFeatureFlags.js
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 = false;
export const enableStrictEffects = __DEV__;

// If TRUE, trees rendered with createRoot will be StrictEffectsMode.
// If FALSE, these trees will be StrictLegacyMode.
Expand Down Expand Up @@ -128,7 +128,7 @@ export const deletedTreeCleanUpLevel = 1;
// Destroy layout effects for components that are hidden because something suspended in an update
// and recreate them when they are shown again (after the suspended boundary has resolved).
// Note that this should be an uncommon use case and can be avoided by using the transition API.
export const enableSuspenseLayoutEffectSemantics = false;
export const enableSuspenseLayoutEffectSemantics = true;

// --------------------------
// Future APIs to be deprecated
Expand Down
3 changes: 2 additions & 1 deletion packages/shared/forks/ReactFeatureFlags.www.js
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 6309193

Please sign in to comment.