From 1383a59ed265531092de68ceb50dbf449070d7c0 Mon Sep 17 00:00:00 2001
From: Davyd Narbutovich <4661784+retyui@users.noreply.github.com>
Date: Fri, 28 Jul 2023 21:42:41 -0700
Subject: [PATCH] Replace `JSX.Element` with `React.JSX.Element` (#38615)
Summary:
the global `JSX` namespace was depreacted in react 18:
```tsx
declare global {
/**
* deprecated Use `React.JSX` instead of the global `JSX` namespace.
*/
namespace JSX {
```
## Changelog:
[GENERAL] [CHANGED] - Replace `JSX.Element` with `React.JSX.Element` in `App.tsx` template
Pull Request resolved: https://github.com/facebook/react-native/pull/38615
Test Plan:
Before
After
Reviewed By: rshest
Differential Revision: D47873435
Pulled By: NickGerleman
fbshipit-source-id: c8a9e0e8e96a54c6ee66fcae2392e0d20d20d026
---
packages/react-native/template/App.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/react-native/template/App.tsx b/packages/react-native/template/App.tsx
index bf24c33164b8e9..125fe1b98eb3be 100644
--- a/packages/react-native/template/App.tsx
+++ b/packages/react-native/template/App.tsx
@@ -29,7 +29,7 @@ type SectionProps = PropsWithChildren<{
title: string;
}>;
-function Section({children, title}: SectionProps): JSX.Element {
+function Section({children, title}: SectionProps): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark';
return (
@@ -55,7 +55,7 @@ function Section({children, title}: SectionProps): JSX.Element {
);
}
-function App(): JSX.Element {
+function App(): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark';
const backgroundStyle = {