@samitouri / QOS-React / commits / 63091939bd

OSS feature flag updates (#21597)

Co-authored-by: Dan Abramov <dan.abramov@me.com>

Brian Vaughn committed Jun 1, 2021 at 10:44 UTC 63091939bdb82c75a5d935143705d09d51380430
2 files changed +4 -3
packages/shared/ReactFeatureFlags.js
+2 -2
@@ -25,7 +25,7 @@ export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
25
26 // Helps identify code that is not safe for planned Offscreen API and Suspense semantics;
27 // this feature flag only impacts StrictEffectsMode.
28 -export const enableStrictEffects = false;
28 +export const enableStrictEffects = __DEV__;
29
30 // If TRUE, trees rendered with createRoot will be StrictEffectsMode.
31 // If FALSE, these trees will be StrictLegacyMode.
@@ -128,7 +128,7 @@ export const deletedTreeCleanUpLevel = 1;
128 // Destroy layout effects for components that are hidden because something suspended in an update
129 // and recreate them when they are shown again (after the suspended boundary has resolved).
130 // Note that this should be an uncommon use case and can be avoided by using the transition API.
131 -export const enableSuspenseLayoutEffectSemantics = false;
131 +export const enableSuspenseLayoutEffectSemantics = true;
132
133 // --------------------------
134 // Future APIs to be deprecated
packages/shared/forks/ReactFeatureFlags.www.js
+2 -1
@@ -25,7 +25,6 @@ export const {
25 deferRenderPhaseUpdateToNextBatch,
26 enableDebugTracing,
27 skipUnmountedBoundaries,
28 - enableStrictEffects,
28 createRootStrictEffectsByDefault,
29 enableSuspenseLayoutEffectSemantics,
30 enableUseRefAccessWarning,
@@ -39,6 +38,8 @@ export const {
38 // On WWW, __EXPERIMENTAL__ is used for a new modern build.
39 // It's not used anywhere in production yet.
40
41 +export const enableStrictEffects =
42 + __DEV__ && dynamicFeatureFlags.enableStrictEffects;
43 export const debugRenderPhaseSideEffectsForStrictMode = __DEV__;
44 export const enableProfilerTimer = __PROFILE__;
45 export const enableProfilerCommitHooks = __PROFILE__;