Today I want to write about ts in the React scaffolding, because remember that the CRA scaffolding comes with typescript versions. After reviewing the documentation, the following commands are provided

NPX create-react-app my-app --typescript is used to create new appsCopy the code

React/app.js/index.js /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx /.tsx JSX is not supported in tsconfig.json. Of course, you can modify the configuration to solve the problem, but then you think, isn’t this the TS project of the newly created CRA? Why do you need to configure so many things? Looking at the CRA scaffolding code on Github, I found the create-React-app project method to create the TS template correctly. The following

Create-react-app test --template typescript // instead of using NPX create-react-app my-app --typescript // probably because the CRA version is updated Why is the document not updated?Copy the code