diff --git a/packages/react-native/Libraries/Animated/createAnimatedComponent.js b/packages/react-native/Libraries/Animated/createAnimatedComponent.js index 78b66e09481..6dcda30a060 100644 --- a/packages/react-native/Libraries/Animated/createAnimatedComponent.js +++ b/packages/react-native/Libraries/Animated/createAnimatedComponent.js @@ -12,6 +12,7 @@ import View from '../Components/View/View'; import useMergeRefs from '../Utilities/useMergeRefs'; import useAnimatedProps from './useAnimatedProps'; import * as React from 'react'; +import {useMemo} from 'react'; // $FlowFixMe[deprecated-type] export type AnimatedProps = $ObjMap< @@ -46,7 +47,10 @@ export default function createAnimatedComponent( const {passthroughAnimatedPropExplicitValues, style} = reducedProps; const {style: passthroughStyle, ...passthroughProps} = passthroughAnimatedPropExplicitValues ?? {}; - const mergedStyle = {...style, ...passthroughStyle}; + const mergedStyle = useMemo( + () => ({...style, ...passthroughStyle}), + [style, passthroughStyle], + ); return (