Skip to content

Commit 041b4c3

Browse files
SamChou19815meta-codesync[bot]
authored andcommitted
Replace React.ElementProps with React.ElementConfig in createAnimatedComponent.js (facebook#54034)
Summary: Pull Request resolved: facebook#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
1 parent 481df76 commit 041b4c3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

packages/react-native/Libraries/Animated/createAnimatedComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default function createAnimatedComponent<
9797
>(
9898
Component: TInstance,
9999
): AnimatedComponentType<
100-
$ReadOnly<React.ElementProps<TInstance>>,
100+
$ReadOnly<React.ElementConfig<TInstance>>,
101101
React.ElementRef<TInstance>,
102102
> {
103103
return unstable_createAnimatedComponentWithAllowlist(Component, null);

packages/react-native/ReactNativeApi.d.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<575e58047a8edf6bbc016768775a258f>>
7+
* @generated SignedSource<<4e0d1f9ebc86fb237989b7099bf6f9df>>
88
*
99
* This file was generated by scripts/js-api/build-types/index.js.
1010
*/
@@ -1920,7 +1920,12 @@ declare function createAnimatedComponent_default<
19201920
>(
19211921
Component: TInstance,
19221922
): AnimatedComponentType<
1923-
Readonly<React.ComponentProps<TInstance>>,
1923+
Readonly<
1924+
React.JSX.LibraryManagedAttributes<
1925+
TInstance,
1926+
React.ComponentProps<TInstance>
1927+
>
1928+
>,
19241929
React.ComponentRef<TInstance>
19251930
>
19261931
declare function createLayoutAnimation(

0 commit comments

Comments
 (0)