TS4060

Return type of exported function has or is using private name 'JSX'.

Broken Code ❌

function App(): JSX.Element {
  return <p>My App!</p>;
}
 
export default App;

Fixed Code ✔️

The global JSX namespace is declared in @types/react. You have to install the @types/react package to make use of it:

yarn add --dev @types/react