Problem with Visual Studio Code using "react-jsx" as jsx value with create-react-app

This is because VSCode's Typescript version is not using the newest babel features that create-react-app uses by default.

You can change VS Code to use the workspace's version of Typescript instead, which will fix this issue.

Open a TypeScript or JavaScript file and click on the TypeScript version number in the Status Bar. A message box will appear asking you which version of TypeScript VS Code should use

Select "Use Workspace Version" to use the newer Create React App typescript version.

In PhpStorm (and the same is probably true for WebStorm) I got it to not complain about "react-jsx" as the value by ticking "Always download the most recent version of schemas" in Remote JSON Schemas.

The option that needs to be ticked

For the ones using VS 2019 I had to install typescript 4.1 for visual studio from here:

Then it worked fine by using the new jsx setting in the compilerOptions etc.