diff --git a/packages/react-native/Libraries/Animated/useAnimatedProps.js b/packages/react-native/Libraries/Animated/useAnimatedProps.js index 134234dacbf..7a058f8882c 100644 --- a/packages/react-native/Libraries/Animated/useAnimatedProps.js +++ b/packages/react-native/Libraries/Animated/useAnimatedProps.js @@ -73,8 +73,6 @@ export default function useAnimatedProps( const useNativePropsInFabric = ReactNativeFeatureFlags.shouldUseSetNativePropsInFabric(); - const useSetNativePropsInNativeAnimationsInFabric = - ReactNativeFeatureFlags.shouldUseSetNativePropsInNativeAnimationsInFabric(); const useAnimatedPropsLifecycle = ReactNativeFeatureFlags.useInsertionEffectsForAnimations() @@ -119,12 +117,7 @@ export default function useAnimatedProps( if (isFabricNode) { // Call `scheduleUpdate` to synchronise Fiber and Shadow tree. // Must not be called in Paper. - if (useSetNativePropsInNativeAnimationsInFabric) { - // $FlowFixMe[incompatible-use] - instance.setNativeProps(node.__getAnimatedValue()); - } else { - scheduleUpdate(); - } + scheduleUpdate(); } return; } @@ -201,12 +194,7 @@ export default function useAnimatedProps( } }; }, - [ - node, - useNativePropsInFabric, - useSetNativePropsInNativeAnimationsInFabric, - props, - ], + [node, useNativePropsInFabric, props], ); const callbackRef = useRefEffect(refEffect); diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 541530b603d..71c40e6814f 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -554,15 +554,6 @@ const definitions: FeatureFlagDefinitions = { purpose: 'experimentation', }, }, - shouldUseSetNativePropsInNativeAnimationsInFabric: { - defaultValue: false, - metadata: { - dateAdded: '2024-03-05', - description: - 'Enables use of setNativeProps in Native driven animations in Fabric.', - purpose: 'experimentation', - }, - }, useInsertionEffectsForAnimations: { defaultValue: true, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index bed5d9990a4..8adc1c0fe3d 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<<36e8036fd1f45794c37a6fa22cde9b05>> * @flow strict */ @@ -42,7 +42,6 @@ export type ReactNativeFeatureFlagsJsOnly = { shouldUseAnimatedObjectForTransform: Getter, shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter, shouldUseSetNativePropsInFabric: Getter, - shouldUseSetNativePropsInNativeAnimationsInFabric: Getter, useInsertionEffectsForAnimations: Getter, useRefsForTextInputState: Getter, }; @@ -174,11 +173,6 @@ export const shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter = cre */ export const shouldUseSetNativePropsInFabric: Getter = createJavaScriptFlagGetter('shouldUseSetNativePropsInFabric', true); -/** - * Enables use of setNativeProps in Native driven animations in Fabric. - */ -export const shouldUseSetNativePropsInNativeAnimationsInFabric: Getter = createJavaScriptFlagGetter('shouldUseSetNativePropsInNativeAnimationsInFabric', false); - /** * Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`. */