Skip to content

Commit ce5d012

Browse files
author
Brian Vaughn
committed
Added new feature flag, enableSuspenseLayoutEffectSemantics
1 parent c9aab1c commit ce5d012

10 files changed

+14
-0
lines changed

packages/shared/ReactFeatureFlags.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ export const skipUnmountedBoundaries = false;
125125
// aggressiveness.
126126
export const deletedTreeCleanUpLevel = 1;
127127

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;
132+
128133
// --------------------------
129134
// Future APIs to be deprecated
130135
// --------------------------

packages/shared/forks/ReactFeatureFlags.native-fb.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const enableFilterEmptyStringAttributesDOM = false;
4747
export const disableNativeComponentFrames = false;
4848
export const skipUnmountedBoundaries = false;
4949
export const deletedTreeCleanUpLevel = 1;
50+
export const enableSuspenseLayoutEffectSemantics = false;
5051

5152
export const enableNewReconciler = false;
5253
export const deferRenderPhaseUpdateToNextBatch = true;

packages/shared/forks/ReactFeatureFlags.native-oss.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const enableFilterEmptyStringAttributesDOM = false;
4646
export const disableNativeComponentFrames = false;
4747
export const skipUnmountedBoundaries = false;
4848
export const deletedTreeCleanUpLevel = 1;
49+
export const enableSuspenseLayoutEffectSemantics = false;
4950

5051
export const enableNewReconciler = false;
5152
export const deferRenderPhaseUpdateToNextBatch = true;

packages/shared/forks/ReactFeatureFlags.test-renderer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const enableFilterEmptyStringAttributesDOM = false;
4646
export const disableNativeComponentFrames = false;
4747
export const skipUnmountedBoundaries = false;
4848
export const deletedTreeCleanUpLevel = 1;
49+
export const enableSuspenseLayoutEffectSemantics = false;
4950

5051
export const enableNewReconciler = false;
5152
export const deferRenderPhaseUpdateToNextBatch = true;

packages/shared/forks/ReactFeatureFlags.test-renderer.native.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const enableFilterEmptyStringAttributesDOM = false;
4646
export const disableNativeComponentFrames = false;
4747
export const skipUnmountedBoundaries = false;
4848
export const deletedTreeCleanUpLevel = 1;
49+
export const enableSuspenseLayoutEffectSemantics = false;
4950

5051
export const enableNewReconciler = false;
5152
export const deferRenderPhaseUpdateToNextBatch = true;

packages/shared/forks/ReactFeatureFlags.test-renderer.www.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const enableFilterEmptyStringAttributesDOM = false;
4646
export const disableNativeComponentFrames = false;
4747
export const skipUnmountedBoundaries = false;
4848
export const deletedTreeCleanUpLevel = 1;
49+
export const enableSuspenseLayoutEffectSemantics = false;
4950

5051
export const enableNewReconciler = false;
5152
export const deferRenderPhaseUpdateToNextBatch = true;

packages/shared/forks/ReactFeatureFlags.testing.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const enableFilterEmptyStringAttributesDOM = false;
4646
export const disableNativeComponentFrames = false;
4747
export const skipUnmountedBoundaries = false;
4848
export const deletedTreeCleanUpLevel = 1;
49+
export const enableSuspenseLayoutEffectSemantics = false;
4950

5051
export const enableNewReconciler = false;
5152
export const deferRenderPhaseUpdateToNextBatch = true;

packages/shared/forks/ReactFeatureFlags.testing.www.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export const enableFilterEmptyStringAttributesDOM = false;
4646
export const disableNativeComponentFrames = false;
4747
export const skipUnmountedBoundaries = true;
4848
export const deletedTreeCleanUpLevel = 1;
49+
export const enableSuspenseLayoutEffectSemantics = false;
4950

5051
export const enableNewReconciler = false;
5152
export const deferRenderPhaseUpdateToNextBatch = true;

packages/shared/forks/ReactFeatureFlags.www-dynamic.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const disableInputAttributeSyncing = __VARIANT__;
1818
export const enableFilterEmptyStringAttributesDOM = __VARIANT__;
1919
export const enableLegacyFBSupport = __VARIANT__;
2020
export const skipUnmountedBoundaries = __VARIANT__;
21+
export const enableSuspenseLayoutEffectSemantics = __VARIANT__;
2122

2223
// Enable this flag to help with concurrent mode debugging.
2324
// It logs information to the console about React scheduling, rendering, and commit phases.

packages/shared/forks/ReactFeatureFlags.www.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const {
2828
skipUnmountedBoundaries,
2929
enableStrictEffects,
3030
createRootStrictEffectsByDefault,
31+
enableSuspenseLayoutEffectSemantics,
3132
enableUseRefAccessWarning,
3233
disableNativeComponentFrames,
3334
disableSchedulerTimeoutInWorkLoop,

0 commit comments

Comments
 (0)