diff --git a/packages/react-native/Libraries/Components/UnimplementedViews/UnimplementedView.js b/packages/react-native/Libraries/Components/UnimplementedViews/UnimplementedView.js index 3c884ad3f6c..00effa4508e 100644 --- a/packages/react-native/Libraries/Components/UnimplementedViews/UnimplementedView.js +++ b/packages/react-native/Libraries/Components/UnimplementedViews/UnimplementedView.js @@ -9,14 +9,22 @@ */ 'use strict'; +import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; + import StyleSheet from '../../StyleSheet/StyleSheet'; import * as React from 'react'; +type Props = $ReadOnly<{ + style?: ?ViewStyleProp, + children?: React.Node, + ... +}>; + /** * Common implementation for a simple stubbed view. Simply applies the view's styles to the inner * View component and renders its children. */ -class UnimplementedView extends React.Component<$FlowFixMeProps> { +class UnimplementedView extends React.Component { render(): React.Node { // Workaround require cycle from requireNativeComponent const View = require('../View/View'); diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index 2d8ba21be09..b04873ebb91 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -3897,7 +3897,12 @@ declare export default typeof UnimplementedNativeViewNativeComponent; `; exports[`public API should not change unintentionally Libraries/Components/UnimplementedViews/UnimplementedView.js 1`] = ` -"declare class UnimplementedView extends React.Component<$FlowFixMeProps> { +"type Props = $ReadOnly<{ + style?: ?ViewStyleProp, + children?: React.Node, + ... +}>; +declare class UnimplementedView extends React.Component { render(): React.Node; } declare module.exports: UnimplementedView;