From 4d3e93560b132e311b7f411a2a83a2e8e7e335eb Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Mon, 25 Mar 2024 16:57:53 -0700 Subject: [PATCH] Cleanup `alwaysThrottleDisappearingFallbacks` Flag --- packages/react-reconciler/src/ReactFiberCommitWork.js | 4 ++-- packages/shared/ReactFeatureFlags.js | 2 -- packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js | 1 - packages/shared/forks/ReactFeatureFlags.native-fb.js | 1 - packages/shared/forks/ReactFeatureFlags.native-oss.js | 1 - packages/shared/forks/ReactFeatureFlags.test-renderer.js | 1 - .../shared/forks/ReactFeatureFlags.test-renderer.native.js | 1 - packages/shared/forks/ReactFeatureFlags.test-renderer.www.js | 1 - packages/shared/forks/ReactFeatureFlags.www-dynamic.js | 1 - packages/shared/forks/ReactFeatureFlags.www.js | 1 - 10 files changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.js b/packages/react-reconciler/src/ReactFiberCommitWork.js index c46fd745b2777..7b88509b65d65 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.js @@ -40,7 +40,7 @@ import type { } from './ReactFiberTracingMarkerComponent'; import { - alwaysThrottleDisappearingFallbacks, + alwaysThrottleRetries, enableCreateEventHandleAPI, enableProfilerTimer, enableProfilerCommitHooks, @@ -2893,7 +2893,7 @@ function commitMutationEffectsOnFiber( current !== null && (current.memoizedState: SuspenseState | null) !== null; - if (alwaysThrottleDisappearingFallbacks) { + if (alwaysThrottleRetries) { if (isShowingFallback !== wasShowingFallback) { // A fallback is either appearing or disappearing. markCommitTimeOfFallback(); diff --git a/packages/shared/ReactFeatureFlags.js b/packages/shared/ReactFeatureFlags.js index 0f77667e5bf08..a1e289d71bab3 100644 --- a/packages/shared/ReactFeatureFlags.js +++ b/packages/shared/ReactFeatureFlags.js @@ -110,8 +110,6 @@ export const enableUseEffectEventHook = __EXPERIMENTAL__; // (handled with an MutationObserver) instead of inline-scripts export const enableFizzExternalRuntime = true; -export const alwaysThrottleDisappearingFallbacks = true; - export const alwaysThrottleRetries = true; export const passChildrenWhenCloningPersistedNodes = false; diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js index 33bc07e6238c9..be82df80b8217 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js @@ -17,7 +17,6 @@ // flag here but it won't be set to `true` in any of our test runs. Need to // add a test configuration for React Native. -export const alwaysThrottleDisappearingFallbacks = __VARIANT__; export const alwaysThrottleRetries = __VARIANT__; export const consoleManagedByDevToolsDuringStrictMode = __VARIANT__; export const enableAsyncActions = __VARIANT__; diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb.js b/packages/shared/forks/ReactFeatureFlags.native-fb.js index 1ace7eae1f0c2..582cb140107e5 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb.js @@ -19,7 +19,6 @@ const dynamicFlags: DynamicExportsType = (dynamicFlagsUntyped: any); // We destructure each value before re-exporting to avoid a dynamic look-up on // the exports object every time a flag is read. export const { - alwaysThrottleDisappearingFallbacks, alwaysThrottleRetries, consoleManagedByDevToolsDuringStrictMode, enableAsyncActions, diff --git a/packages/shared/forks/ReactFeatureFlags.native-oss.js b/packages/shared/forks/ReactFeatureFlags.native-oss.js index 14ccfc88ef3e1..46f96b7c9d44f 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-oss.js +++ b/packages/shared/forks/ReactFeatureFlags.native-oss.js @@ -27,7 +27,6 @@ export const enableReactTestRendererWarning = __TODO_NEXT_RN_MAJOR__; export const enableAsyncActions = __TODO_NEXT_RN_MAJOR__; export const consoleManagedByDevToolsDuringStrictMode = __TODO_NEXT_RN_MAJOR__; export const enableDeferRootSchedulingToMicrotask = __TODO_NEXT_RN_MAJOR__; -export const alwaysThrottleDisappearingFallbacks = __TODO_NEXT_RN_MAJOR__; export const alwaysThrottleRetries = __TODO_NEXT_RN_MAJOR__; export const enableInfiniteRenderLoopDetection = __TODO_NEXT_RN_MAJOR__; export const enableComponentStackLocations = __TODO_NEXT_RN_MAJOR__; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.js index 26866114aef3f..a21d19ae5080e 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.js @@ -72,7 +72,6 @@ export const enableDeferRootSchedulingToMicrotask = true; export const enableAsyncActions = true; -export const alwaysThrottleDisappearingFallbacks = true; export const alwaysThrottleRetries = true; export const passChildrenWhenCloningPersistedNodes = false; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js index c9eda11db090c..f307540b20c2a 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js @@ -74,7 +74,6 @@ export const enableDeferRootSchedulingToMicrotask = false; export const enableAsyncActions = true; -export const alwaysThrottleDisappearingFallbacks = true; export const alwaysThrottleRetries = true; export const passChildrenWhenCloningPersistedNodes = false; diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js index 86d9046186744..cb499f31d7032 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js @@ -75,7 +75,6 @@ export const enableDeferRootSchedulingToMicrotask = true; export const enableAsyncActions = true; -export const alwaysThrottleDisappearingFallbacks = false; export const alwaysThrottleRetries = true; export const passChildrenWhenCloningPersistedNodes = false; diff --git a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js index 32fd025104096..89ef7fae0858a 100644 --- a/packages/shared/forks/ReactFeatureFlags.www-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.www-dynamic.js @@ -24,7 +24,6 @@ export const forceConcurrentByDefaultForTesting = __VARIANT__; export const enableUnifiedSyncLane = __VARIANT__; export const enableTransitionTracing = __VARIANT__; export const enableDeferRootSchedulingToMicrotask = __VARIANT__; -export const alwaysThrottleDisappearingFallbacks = __VARIANT__; export const alwaysThrottleRetries = __VARIANT__; export const enableDO_NOT_USE_disableStrictPassiveEffect = __VARIANT__; export const enableUseDeferredValueInitialArg = __VARIANT__; diff --git a/packages/shared/forks/ReactFeatureFlags.www.js b/packages/shared/forks/ReactFeatureFlags.www.js index 907ab62ab52de..8902b5efac7c6 100644 --- a/packages/shared/forks/ReactFeatureFlags.www.js +++ b/packages/shared/forks/ReactFeatureFlags.www.js @@ -27,7 +27,6 @@ export const { enableRetryLaneExpiration, enableTransitionTracing, enableDeferRootSchedulingToMicrotask, - alwaysThrottleDisappearingFallbacks, alwaysThrottleRetries, enableDO_NOT_USE_disableStrictPassiveEffect, disableSchedulerTimeoutInWorkLoop,