Replace React.AbstractComponent with component type in View (#46916)

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

Prepare for the ref-as-prop typing change in flow.

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D64104990

fbshipit-source-id: c747f4e89b5631a6c1543aca86cbea4db4987f5a
This commit is contained in:
Fabrizio Cucci
2024-10-10 07:01:29 -07:00
committed by Facebook GitHub Bot
parent ab8f3ff3e9
commit f86a14e4ad
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -23,10 +23,10 @@ export type Props = ViewProps;
*
* @see https://reactnative.dev/docs/view
*/
const View: React.AbstractComponent<
ViewProps,
React.ElementRef<typeof ViewNativeComponent>,
> = React.forwardRef(
const View: component(
ref: React.RefSetter<React.ElementRef<typeof ViewNativeComponent>>,
...props: ViewProps
) = React.forwardRef(
(
{
accessibilityElementsHidden,
@@ -3924,10 +3924,10 @@ declare module.exports: ReactNativeViewAttributes;
exports[`public API should not change unintentionally Libraries/Components/View/View.js 1`] = `
"export type Props = ViewProps;
declare const View: React.AbstractComponent<
ViewProps,
React.ElementRef<typeof ViewNativeComponent>,
>;
declare const View: component(
ref: React.RefSetter<React.ElementRef<typeof ViewNativeComponent>>,
...props: ViewProps
);
declare module.exports: View;
"
`;