Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f4cc970

Browse files
author
Brian Vaughn
authored
Enable new passive effect behavior for FB builds (facebook#18444)
* Enable new passive effect behavior for FB builds Previously this behavior was controlled by GKs. This PR updates the flags to be enabled statically. It also enables the flags in the test builds.
1 parent 9065e02 commit f4cc970

4 files changed

+7
-8
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export const disableTextareaChildren = false;
3939
export const disableMapsAsChildren = false;
4040
export const disableModulePatternComponents = false;
4141
export const warnUnstableRenderSubtreeIntoContainer = false;
42-
export const deferPassiveEffectCleanupDuringUnmount = false;
43-
export const runAllPassiveEffectDestroysBeforeCreates = false;
42+
export const deferPassiveEffectCleanupDuringUnmount = true;
43+
export const runAllPassiveEffectDestroysBeforeCreates = true;
4444
export const enableModernEventSystem = false;
4545
export const warnAboutSpreadingKeyToJSX = false;
4646
export const enableLegacyFBSupport = false;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export const disableTextareaChildren = __EXPERIMENTAL__;
3939
export const disableMapsAsChildren = __EXPERIMENTAL__;
4040
export const disableModulePatternComponents = false;
4141
export const warnUnstableRenderSubtreeIntoContainer = false;
42-
export const deferPassiveEffectCleanupDuringUnmount = false;
43-
export const runAllPassiveEffectDestroysBeforeCreates = false;
42+
export const deferPassiveEffectCleanupDuringUnmount = true;
43+
export const runAllPassiveEffectDestroysBeforeCreates = true;
4444
export const enableModernEventSystem = false;
4545
export const warnAboutSpreadingKeyToJSX = false;
4646
export const enableLegacyFBSupport = !__EXPERIMENTAL__;

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
// Use __VARIANT__ to simulate a GK. The tests will be run twice: once
1414
// with the __VARIANT__ set to `true`, and once set to `false`.
1515

16-
export const deferPassiveEffectCleanupDuringUnmount = __VARIANT__;
17-
export const runAllPassiveEffectDestroysBeforeCreates = __VARIANT__;
1816
export const warnAboutSpreadingKeyToJSX = __VARIANT__;
1917

2018
// These are already tested in both modes using the build type dimension,

packages/shared/forks/ReactFeatureFlags.www.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ const dynamicFeatureFlags: DynamicFeatureFlags = require('ReactFeatureFlags');
1616

1717
export const {
1818
debugRenderPhaseSideEffectsForStrictMode,
19-
deferPassiveEffectCleanupDuringUnmount,
2019
disableInputAttributeSyncing,
2120
enableTrustedTypesIntegration,
22-
runAllPassiveEffectDestroysBeforeCreates,
2321
warnAboutShorthandPropertyCollision,
2422
disableSchedulerTimeoutBasedOnReactExpirationTime,
2523
warnAboutSpreadingKeyToJSX,
@@ -83,6 +81,9 @@ export const throwEarlyForMysteriousError = false;
8381
// to the correct value.
8482
export const enableNewReconciler = __VARIANT__;
8583

84+
export const deferPassiveEffectCleanupDuringUnmount = true;
85+
export const runAllPassiveEffectDestroysBeforeCreates = true;
86+
8687
// Flow magic to verify the exports of this file match the original version.
8788
// eslint-disable-next-line no-unused-vars
8889
type Check<_X, Y: _X, X: Y = _X> = null;

0 commit comments

Comments
 (0)