mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
delete passthroughAnimatedPropExplicitValues from animated component (#43407)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43407 changelog: [internal] `passthroughAnimatedPropExplicitValues` is not used. Let's remove it. Reviewed By: yungsters Differential Revision: D54583470 fbshipit-source-id: 9e480e4bf3216d4d6c9d7eac99a6b4d5a2e9583f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
41b6371940
commit
255d1cebf2
@@ -8,19 +8,12 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import View from '../Components/View/View';
|
||||
import useMergeRefs from '../Utilities/useMergeRefs';
|
||||
import useAnimatedProps from './useAnimatedProps';
|
||||
import * as React from 'react';
|
||||
|
||||
// $FlowFixMe[deprecated-type]
|
||||
export type AnimatedProps<Props: {...}> = $ObjMap<
|
||||
Props &
|
||||
$ReadOnly<{
|
||||
passthroughAnimatedPropExplicitValues?: React.ElementConfig<typeof View>,
|
||||
}>,
|
||||
() => any,
|
||||
>;
|
||||
export type AnimatedProps<Props: {...}> = $ObjMap<Props, () => any>;
|
||||
|
||||
export type AnimatedComponentType<
|
||||
Props: {...},
|
||||
@@ -43,19 +36,9 @@ export default function createAnimatedComponent<TProps: {...}, TInstance>(
|
||||
// transformed and Pressable, onPress will not work after transform
|
||||
// without these passthrough values.
|
||||
// $FlowFixMe[prop-missing]
|
||||
const {passthroughAnimatedPropExplicitValues, style} = reducedProps;
|
||||
const {style: passthroughStyle, ...passthroughProps} =
|
||||
passthroughAnimatedPropExplicitValues ?? {};
|
||||
const mergedStyle = {...style, ...passthroughStyle};
|
||||
const {style} = reducedProps;
|
||||
|
||||
return (
|
||||
<Component
|
||||
{...reducedProps}
|
||||
{...passthroughProps}
|
||||
style={mergedStyle}
|
||||
ref={ref}
|
||||
/>
|
||||
);
|
||||
return <Component {...reducedProps} style={style} ref={ref} />;
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -810,13 +810,7 @@ exports[`public API should not change unintentionally Libraries/Animated/compone
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Animated/createAnimatedComponent.js 1`] = `
|
||||
"export type AnimatedProps<Props: { ... }> = $ObjMap<
|
||||
Props &
|
||||
$ReadOnly<{
|
||||
passthroughAnimatedPropExplicitValues?: React.ElementConfig<typeof View>,
|
||||
}>,
|
||||
() => any,
|
||||
>;
|
||||
"export type AnimatedProps<Props: { ... }> = $ObjMap<Props, () => any>;
|
||||
export type AnimatedComponentType<
|
||||
Props: { ... },
|
||||
+Instance = mixed,
|
||||
|
||||
Reference in New Issue
Block a user