From ec1e2afd089295324eabc8cdcc5638aee52c85a8 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Thu, 13 Jul 2023 12:29:21 -0700 Subject: [PATCH] Rename helper function to avoid confusion with React hook (#38340) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38340 changelog: [internal] Reviewed By: yungsters Differential Revision: D47437149 fbshipit-source-id: 32a9c4effa1a2ea2207d5cb85f0ffd7878110d11 --- packages/react-native/Libraries/Animated/useAnimatedProps.js | 2 +- .../Libraries/ReactNative/ReactNativeFeatureFlags.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native/Libraries/Animated/useAnimatedProps.js b/packages/react-native/Libraries/Animated/useAnimatedProps.js index c8ac6bcfa37193..2d87e367d81c46 100644 --- a/packages/react-native/Libraries/Animated/useAnimatedProps.js +++ b/packages/react-native/Libraries/Animated/useAnimatedProps.js @@ -47,7 +47,7 @@ export default function useAnimatedProps( [props], ); const useNativePropsInFabric = - ReactNativeFeatureFlags.useSetNativePropsInFabric(); + ReactNativeFeatureFlags.shouldUseSetNativePropsInFabric(); useAnimatedPropsLifecycle(node); // TODO: This "effect" does three things: diff --git a/packages/react-native/Libraries/ReactNative/ReactNativeFeatureFlags.js b/packages/react-native/Libraries/ReactNative/ReactNativeFeatureFlags.js index 16fb2c5873ad1f..40749a4ce4e2bf 100644 --- a/packages/react-native/Libraries/ReactNative/ReactNativeFeatureFlags.js +++ b/packages/react-native/Libraries/ReactNative/ReactNativeFeatureFlags.js @@ -52,7 +52,7 @@ export type FeatureFlags = {| /** * Enables use of setNativeProps in JS driven animations. */ - useSetNativePropsInFabric: () => boolean, + shouldUseSetNativePropsInFabric: () => boolean, |}; const ReactNativeFeatureFlags: FeatureFlags = { @@ -64,7 +64,7 @@ const ReactNativeFeatureFlags: FeatureFlags = { isGlobalWebPerformanceLoggerEnabled: () => false, enableAccessToHostTreeInFabric: () => false, shouldUseAnimatedObjectForTransform: () => false, - useSetNativePropsInFabric: () => false, + shouldUseSetNativePropsInFabric: () => false, }; module.exports = ReactNativeFeatureFlags;