Skip to content

Commit

Permalink
[cleanup] remove unused values from ReactFeatureFlags.www-dynamic
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kassens committed Oct 27, 2022
1 parent 28a574e commit 1e507ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
14 changes: 0 additions & 14 deletions packages/shared/forks/ReactFeatureFlags.www-dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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__;
Expand All @@ -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.
6 changes: 3 additions & 3 deletions packages/shared/forks/ReactFeatureFlags.www.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ export const {
replayFailedUnitOfWorkWithInvokeGuardedCallback,
enableFilterEmptyStringAttributesDOM,
enableLegacyFBSupport,
deferRenderPhaseUpdateToNextBatch,
enableDebugTracing,
skipUnmountedBoundaries,
createRootStrictEffectsByDefault,
enableUseRefAccessWarning,
disableNativeComponentFrames,
disableSchedulerTimeoutInWorkLoop,
enableLazyContextPropagation,
enableSyncDefaultUpdates,
enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay,
enableClientRenderFallbackOnTextMismatch,
enableTransitionTracing,
} = dynamicFeatureFlags;

Expand All @@ -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;
Expand All @@ -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 =
Expand Down

0 comments on commit 1e507ec

Please sign in to comment.