TS7026

error TS7026: JSX element implicitly has type ‘any’ because no interface ‘JSX.IntrinsicElements’ exists.

Broken Code ❌

1
2
3
4
5
6
7
8
9
function App() {
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:

1
yarn add --dev @types/react