diff --git a/packages/react-native/Libraries/Components/View/View.js b/packages/react-native/Libraries/Components/View/View.js index a7177fccf1595a..94ffb6fea6dda3 100644 --- a/packages/react-native/Libraries/Components/View/View.js +++ b/packages/react-native/Libraries/Components/View/View.js @@ -23,7 +23,7 @@ import {use} from 'react'; * * @see https://reactnative.dev/docs/view */ -export default component View( +component View( ref?: React.RefSetter>, ...props: ViewProps ) { @@ -213,3 +213,7 @@ export default component View( } return actualView; } + +View.displayName = 'View'; + +export default View; diff --git a/packages/react-native/ReactNativeApi.d.ts b/packages/react-native/ReactNativeApi.d.ts index eee18b46fb735a..5cd6d7deb46685 100644 --- a/packages/react-native/ReactNativeApi.d.ts +++ b/packages/react-native/ReactNativeApi.d.ts @@ -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<> + * @generated SignedSource<> * * This file was generated by scripts/js-api/build-types/index.js. */ @@ -558,6 +558,7 @@ declare const Vibration_default: { cancel: () => void vibrate: (pattern?: Array | number, repeat?: boolean) => void } +declare const View: typeof View_default declare const ViewNativeComponent_default: HostComponent declare const VirtualizedList: typeof VirtualizedListComponent_default declare const VirtualizedListComponent_default: VirtualizedListType @@ -5621,7 +5622,8 @@ declare type ValueXYListenerCallback = (value: { y: number }) => unknown declare type Vibration = typeof Vibration -declare function View( +declare type View = typeof View +declare function View_default( props: ViewProps & { ref?: React.Ref> }, @@ -6165,7 +6167,7 @@ export { UIManager, // 8d2c8281 UTFSequence, // baacd11b Vibration, // 315e131d - View, // 75d9e33b + View, // 39dd4de4 ViewProps, // 0ab8ceda ViewPropsAndroid, // f3d007c3 ViewPropsIOS, // 58ee19bf