From d3b203f2cb2893aea1b342ea2e62d92388bc511f Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Mon, 3 Mar 2025 08:04:27 -0800 Subject: [PATCH] Cleanup enableAnimatedClearImmediateFix (#49787) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49787 We're not experimenting with this, so cleanup the code. Changelog: [Internal] Reviewed By: fabriziocucci Differential Revision: D70488980 fbshipit-source-id: 12e93b7f8fb89e3bb1f06c8f734b782286f3fad3 --- .../featureflags/ReactNativeFeatureFlags.config.js | 11 ----------- .../src/private/animated/NativeAnimatedHelper.js | 6 +----- .../private/featureflags/ReactNativeFeatureFlags.js | 8 +------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 611e2e0b599..84197a23207 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -562,17 +562,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'none', }, - enableAnimatedClearImmediateFix: { - defaultValue: true, - metadata: { - dateAdded: '2024-09-17', - description: - 'Enables an experimental to use the proper clearIntermediate instead of calling the wrong clearTimeout and canceling another timer.', - expectedReleaseValue: true, - purpose: 'experimentation', - }, - ossReleaseStage: 'none', - }, enableDOMDocumentAPI: { defaultValue: false, metadata: { diff --git a/packages/react-native/src/private/animated/NativeAnimatedHelper.js b/packages/react-native/src/private/animated/NativeAnimatedHelper.js index 9ef311408a8..9074d7c22e2 100644 --- a/packages/react-native/src/private/animated/NativeAnimatedHelper.js +++ b/packages/react-native/src/private/animated/NativeAnimatedHelper.js @@ -144,11 +144,7 @@ const API = { ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush() && flushQueueImmediate ) { - if (ReactNativeFeatureFlags.enableAnimatedClearImmediateFix()) { - clearImmediate(flushQueueImmediate); - } else { - clearTimeout(flushQueueImmediate); - } + clearImmediate(flushQueueImmediate); } }, diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 4625001cf6e..9a5b6af9425 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<3e68d888bf4d8ac71b63571a639d265b>> + * @generated SignedSource<<857c807934fc671129d3c85605de7171>> * @flow strict */ @@ -33,7 +33,6 @@ export type ReactNativeFeatureFlagsJsOnly = $ReadOnly<{ avoidStateUpdateInAnimatedPropsMemo: Getter, disableInteractionManager: Getter, enableAccessToHostTreeInFabric: Getter, - enableAnimatedClearImmediateFix: Getter, enableDOMDocumentAPI: Getter, fixVirtualizeListCollapseWindowSize: Getter, isLayoutAnimationEnabled: Getter, @@ -124,11 +123,6 @@ export const disableInteractionManager: Getter = createJavaScriptFlagGe */ export const enableAccessToHostTreeInFabric: Getter = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric', false); -/** - * Enables an experimental to use the proper clearIntermediate instead of calling the wrong clearTimeout and canceling another timer. - */ -export const enableAnimatedClearImmediateFix: Getter = createJavaScriptFlagGetter('enableAnimatedClearImmediateFix', true); - /** * Enables the DOM Document API, exposing instaces of document through `getRootNode` and `ownerDocument`, and providing access to the `documentElement` representing the root node. This flag will be short-lived, only to test the Document API specifically, and then it will be collapsed into the enableAccessToHostTreeInFabric flag. */