From 1e507ecd64ce137ade6d0be00527ab871f9061a8 Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Thu, 27 Oct 2022 13:33:53 -0400 Subject: [PATCH] [cleanup] remove unused values from ReactFeatureFlags.www-dynamic These values are never imported into `ReactFeatureFlags.www.js`, so they're never used: - allowConcurrentByDefault - consoleManagedByDevToolsDuringStrictMode These values are never set in the WWW module, so they're always `undefined` on www: - createRootStrictEffectsByDefault - deferRenderPhaseUpdateToNextBatch - enableClientRenderFallbackOnTextMismatch --- .../shared/forks/ReactFeatureFlags.www-dynamic.js | 14 -------------- packages/shared/forks/ReactFeatureFlags.www.js | 6 +++--- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js index 882871de6f507..10806e41f2141 100644 --- a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js @@ -24,9 +24,7 @@ export const enableProfilerNestedUpdateScheduledHook = __VARIANT__; export const disableSchedulerTimeoutInWorkLoop = __VARIANT__; export const enableLazyContextPropagation = __VARIANT__; export const enableSyncDefaultUpdates = __VARIANT__; -export const consoleManagedByDevToolsDuringStrictMode = __VARIANT__; export const enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay = __VARIANT__; -export const enableClientRenderFallbackOnTextMismatch = __VARIANT__; export const enableTransitionTracing = __VARIANT__; // Enable this flag to help with concurrent mode debugging. // It logs information to the console about React scheduling, rendering, and commit phases. @@ -36,16 +34,6 @@ export const enableDebugTracing = __EXPERIMENTAL__; export const enableSchedulingProfiler = __VARIANT__; -// This only has an effect in the new reconciler. But also, the new reconciler -// is only enabled when __VARIANT__ is true. So this is set to the opposite of -// __VARIANT__ so that it's `false` when running against the new reconciler. -// Ideally we would test both against the new reconciler, but until then, we -// should test the value that is used in www. Which is `false`. -// -// Once Lanes has landed in both reconciler forks, we'll get coverage of -// both branches. -export const deferRenderPhaseUpdateToNextBatch = !__VARIANT__; - // These are already tested in both modes using the build type dimension, // so we don't need to use __VARIANT__ to get extra coverage. export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__; @@ -56,7 +44,5 @@ export const replayFailedUnitOfWorkWithInvokeGuardedCallback = __DEV__; export const enableTrustedTypesIntegration = false; export const disableSchedulerTimeoutBasedOnReactExpirationTime = false; export const disableNativeComponentFrames = false; -export const createRootStrictEffectsByDefault = false; -export const allowConcurrentByDefault = true; // You probably *don't* want to add more hardcoded ones. // Instead, try to add them above with the __VARIANT__ value. diff --git a/packages/shared/forks/ReactFeatureFlags.www.js b/packages/shared/forks/ReactFeatureFlags.www.js index 51ff1be193555..69770109ce8c0 100644 --- a/packages/shared/forks/ReactFeatureFlags.www.js +++ b/packages/shared/forks/ReactFeatureFlags.www.js @@ -22,17 +22,14 @@ export const { replayFailedUnitOfWorkWithInvokeGuardedCallback, enableFilterEmptyStringAttributesDOM, enableLegacyFBSupport, - deferRenderPhaseUpdateToNextBatch, enableDebugTracing, skipUnmountedBoundaries, - createRootStrictEffectsByDefault, enableUseRefAccessWarning, disableNativeComponentFrames, disableSchedulerTimeoutInWorkLoop, enableLazyContextPropagation, enableSyncDefaultUpdates, enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay, - enableClientRenderFallbackOnTextMismatch, enableTransitionTracing, } = dynamicFeatureFlags; @@ -47,6 +44,8 @@ export const enableProfilerNestedUpdateScheduledHook: boolean = __PROFILE__ && dynamicFeatureFlags.enableProfilerNestedUpdateScheduledHook; export const enableUpdaterTracking = __PROFILE__; +export const createRootStrictEffectsByDefault = false; +export const deferRenderPhaseUpdateToNextBatch = false; export const enableSuspenseAvoidThisFallback = true; export const enableSuspenseAvoidThisFallbackFizz = false; export const enableCPUSuspense = true; @@ -55,6 +54,7 @@ export const enableUseHook = true; export const enableUseMemoCacheHook = true; export const enableUseEventHook = true; export const enableHostSingletons = true; +export const enableClientRenderFallbackOnTextMismatch = false; // Logs additional User Timing API marks for use with an experimental profiling tool. export const enableSchedulingProfiler: boolean =