From 2a33e409f2dec4fd34fbe5073aa8c1cb42bbd041 Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Tue, 1 Nov 2022 11:08:56 -0400 Subject: [PATCH] add back deferRenderPhaseUpdateToNextBatch which causes test failures if simply removed --- packages/shared/forks/ReactFeatureFlags.www-dynamic.js | 10 ++++++++++ packages/shared/forks/ReactFeatureFlags.www.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js index 10806e41f2141..77ca9da4e649d 100644 --- a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js @@ -34,6 +34,16 @@ 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__; diff --git a/packages/shared/forks/ReactFeatureFlags.www.js b/packages/shared/forks/ReactFeatureFlags.www.js index 69770109ce8c0..1861d00a2dcb2 100644 --- a/packages/shared/forks/ReactFeatureFlags.www.js +++ b/packages/shared/forks/ReactFeatureFlags.www.js @@ -22,6 +22,7 @@ export const { replayFailedUnitOfWorkWithInvokeGuardedCallback, enableFilterEmptyStringAttributesDOM, enableLegacyFBSupport, + deferRenderPhaseUpdateToNextBatch, enableDebugTracing, skipUnmountedBoundaries, enableUseRefAccessWarning, @@ -45,7 +46,6 @@ export const enableProfilerNestedUpdateScheduledHook: boolean = export const enableUpdaterTracking = __PROFILE__; export const createRootStrictEffectsByDefault = false; -export const deferRenderPhaseUpdateToNextBatch = false; export const enableSuspenseAvoidThisFallback = true; export const enableSuspenseAvoidThisFallbackFizz = false; export const enableCPUSuspense = true;