Skip to content

Commit 6309193

Browse files
Brian Vaughngaearon
andauthored
OSS feature flag updates (#21597)
Co-authored-by: Dan Abramov <dan.abramov@me.com>
1 parent efbd69b commit 6309193

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/shared/ReactFeatureFlags.js

Lines changed: 2 additions & 2 deletions
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 = false;
28+
export const enableStrictEffects = __DEV__;
2929

3030
// If TRUE, trees rendered with createRoot will be StrictEffectsMode.
3131
// If FALSE, these trees will be StrictLegacyMode.
@@ -128,7 +128,7 @@ export const deletedTreeCleanUpLevel = 1;
128128
// Destroy layout effects for components that are hidden because something suspended in an update
129129
// and recreate them when they are shown again (after the suspended boundary has resolved).
130130
// 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;
132132

133133
// --------------------------
134134
// Future APIs to be deprecated

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)