@samitouri / QOS-React / commits / f4cc970276

Enable new passive effect behavior for FB builds (#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.

Brian Vaughn committed Mar 31, 2020 at 10:05 UTC f4cc970276ee7d66db54191b626b19c721ebaa91
4 files changed +7 -8
packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
+2 -2
@@ -39,8 +39,8 @@ export const disableTextareaChildren = false;
39 export const disableMapsAsChildren = false;
40 export const disableModulePatternComponents = false;
41 export const warnUnstableRenderSubtreeIntoContainer = false;
42 -export const deferPassiveEffectCleanupDuringUnmount = false;
43 -export const runAllPassiveEffectDestroysBeforeCreates = false;
42 +export const deferPassiveEffectCleanupDuringUnmount = true;
43 +export const runAllPassiveEffectDestroysBeforeCreates = true;
44 export const enableModernEventSystem = false;
45 export const warnAboutSpreadingKeyToJSX = false;
46 export const enableLegacyFBSupport = false;
packages/shared/forks/ReactFeatureFlags.testing.www.js
+2 -2
@@ -39,8 +39,8 @@ export const disableTextareaChildren = __EXPERIMENTAL__;
39 export const disableMapsAsChildren = __EXPERIMENTAL__;
40 export const disableModulePatternComponents = false;
41 export const warnUnstableRenderSubtreeIntoContainer = false;
42 -export const deferPassiveEffectCleanupDuringUnmount = false;
43 -export const runAllPassiveEffectDestroysBeforeCreates = false;
42 +export const deferPassiveEffectCleanupDuringUnmount = true;
43 +export const runAllPassiveEffectDestroysBeforeCreates = true;
44 export const enableModernEventSystem = false;
45 export const warnAboutSpreadingKeyToJSX = false;
46 export const enableLegacyFBSupport = !__EXPERIMENTAL__;
packages/shared/forks/ReactFeatureFlags.www-dynamic.js
-2
@@ -13,8 +13,6 @@
13 // Use __VARIANT__ to simulate a GK. The tests will be run twice: once
14 // with the __VARIANT__ set to `true`, and once set to `false`.
15
16 -export const deferPassiveEffectCleanupDuringUnmount = __VARIANT__;
17 -export const runAllPassiveEffectDestroysBeforeCreates = __VARIANT__;
16 export const warnAboutSpreadingKeyToJSX = __VARIANT__;
17
18 // These are already tested in both modes using the build type dimension,
packages/shared/forks/ReactFeatureFlags.www.js
+3 -2
@@ -16,10 +16,8 @@ const dynamicFeatureFlags: DynamicFeatureFlags = require('ReactFeatureFlags');
16
17 export const {
18 debugRenderPhaseSideEffectsForStrictMode,
19 - deferPassiveEffectCleanupDuringUnmount,
19 disableInputAttributeSyncing,
20 enableTrustedTypesIntegration,
22 - runAllPassiveEffectDestroysBeforeCreates,
21 warnAboutShorthandPropertyCollision,
22 disableSchedulerTimeoutBasedOnReactExpirationTime,
23 warnAboutSpreadingKeyToJSX,
@@ -83,6 +81,9 @@ export const throwEarlyForMysteriousError = false;
81 // to the correct value.
82 export const enableNewReconciler = __VARIANT__;
83
84 +export const deferPassiveEffectCleanupDuringUnmount = true;
85 +export const runAllPassiveEffectDestroysBeforeCreates = true;
86 +
87 // Flow magic to verify the exports of this file match the original version.
88 // eslint-disable-next-line no-unused-vars
89 type Check<_X, Y: _X, X: Y = _X> = null;