Skip to content

Commit d4c46dd

Browse files
committed
fix: restore View display name
1 parent 6b550a2 commit d4c46dd

File tree

1 file changed

+12
-3
lines changed
  • packages/react-native/Libraries/Components/View

1 file changed

+12
-3
lines changed

packages/react-native/Libraries/Components/View/View.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@ import {use} from 'react';
2323
*
2424
* @see https://reactnative.dev/docs/view
2525
*/
26-
export default component View(
26+
const ViewImpl: component(
2727
ref?: React.RefSetter<React.ElementRef<typeof ViewNativeComponent>>,
2828
...props: ViewProps
29-
) {
29+
) = ({
30+
ref,
31+
...props
32+
}: {
33+
ref?: React.RefSetter<React.ElementRef<typeof ViewNativeComponent>>,
34+
...ViewProps,
35+
}) => {
3036
const hasTextAncestor = use(TextAncestorContext);
3137

3238
let actualView;
@@ -212,4 +218,7 @@ export default component View(
212218
);
213219
}
214220
return actualView;
215-
}
221+
};
222+
223+
ViewImpl.displayName = 'View';
224+
export default ViewImpl;

0 commit comments

Comments
 (0)