diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 7519e7d5898..7de76c79254 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -970,17 +970,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'none', }, - animatedShouldDebounceQueueFlush: { - defaultValue: true, - metadata: { - dateAdded: '2024-02-05', - description: - 'Enables an experimental flush-queue debouncing in Animated.js.', - expectedReleaseValue: true, - purpose: 'experimentation', - }, - ossReleaseStage: 'none', - }, animatedShouldSyncValueBeforeStartCallback: { defaultValue: true, metadata: { diff --git a/packages/react-native/src/private/animated/NativeAnimatedHelper.js b/packages/react-native/src/private/animated/NativeAnimatedHelper.js index eaaefb5b9a0..03d7f5c1c23 100644 --- a/packages/react-native/src/private/animated/NativeAnimatedHelper.js +++ b/packages/react-native/src/private/animated/NativeAnimatedHelper.js @@ -203,11 +203,7 @@ const API = { disableQueue(): void { invariant(NativeAnimatedModule, 'Native animated module is not available'); - if (ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush()) { - scheduleQueueFlush(); - } else { - API.flushQueue(); - } + scheduleQueueFlush(); }, disconnectAnimatedNodeFromView(nodeTag: number, viewTag: number): void { NativeOperations.disconnectAnimatedNodeFromView(nodeTag, viewTag); @@ -311,10 +307,7 @@ const API = { waitingForQueuedOperations.add(id); queueOperations = true; - if ( - ReactNativeFeatureFlags.animatedShouldDebounceQueueFlush() && - flushQueueImmediate - ) { + if (flushQueueImmediate) { clearImmediate(flushQueueImmediate); } }, diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 918b6b821aa..a0128c87b1a 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<> + * @generated SignedSource<<1a333a44919efce6bb2070bae79bdf9b>> * @flow strict * @noformat */ @@ -31,7 +31,6 @@ export type ReactNativeFeatureFlagsJsOnly = Readonly<{ jsOnlyTestFlag: Getter, animatedDeferStartOfTimingAnimations: Getter, animatedForceNativeDriver: Getter, - animatedShouldDebounceQueueFlush: Getter, animatedShouldSyncValueBeforeStartCallback: Getter, animatedShouldUseSingleOp: Getter, deferFlatListFocusChangeRenderUpdate: Getter, @@ -151,11 +150,6 @@ export const animatedDeferStartOfTimingAnimations: Getter = createJavaS */ export const animatedForceNativeDriver: Getter = createJavaScriptFlagGetter('animatedForceNativeDriver', false); -/** - * Enables an experimental flush-queue debouncing in Animated.js. - */ -export const animatedShouldDebounceQueueFlush: Getter = createJavaScriptFlagGetter('animatedShouldDebounceQueueFlush', true); - /** * When a useNativeDriver animation completes, syncs the JS-side AnimatedValue with the post-animation value BEFORE invoking the user-supplied start({finished}) callback. Without the flag, the callback observes the pre-animation value, which can cause downstream re-renders to read stale interpolation outputs. */