Replace React.ElementProps with React.ElementConfig in createAnimatedComponent.js (#54034)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54034

`React.ElementConfig` is often the better choice. See https://flow.org/en/docs/react/types/#toc-react-elementprops

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D83750127

fbshipit-source-id: 788169d73cccc2ed7c9b250845ad7277fe79c47f
This commit is contained in:
Sam Zhou
2025-10-02 13:47:40 -07:00
committed by meta-codesync[bot]
parent 481df76c24
commit 041b4c3dd0
2 changed files with 8 additions and 3 deletions
@@ -97,7 +97,7 @@ export default function createAnimatedComponent<
>(
Component: TInstance,
): AnimatedComponentType<
$ReadOnly<React.ElementProps<TInstance>>,
$ReadOnly<React.ElementConfig<TInstance>>,
React.ElementRef<TInstance>,
> {
return unstable_createAnimatedComponentWithAllowlist(Component, null);
+7 -2
View File
@@ -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<<575e58047a8edf6bbc016768775a258f>>
* @generated SignedSource<<4e0d1f9ebc86fb237989b7099bf6f9df>>
*
* This file was generated by scripts/js-api/build-types/index.js.
*/
@@ -1920,7 +1920,12 @@ declare function createAnimatedComponent_default<
>(
Component: TInstance,
): AnimatedComponentType<
Readonly<React.ComponentProps<TInstance>>,
Readonly<
React.JSX.LibraryManagedAttributes<
TInstance,
React.ComponentProps<TInstance>
>
>,
React.ComponentRef<TInstance>
>
declare function createLayoutAnimation(