create-react-app make it easy to create a new app running React and TypeScript.
npx create-react-app my-app --template typescript
Then you go into the folder and run the app.
cd my-app npm start
--template typescript. And you can also run the app with
If, as I was, you're not getting the app working, you might have an older global installation of
create-react-app. In my case I installed it with
npm install -g create-react-app (which I could verify by running
create-react-app -V on the Terminal. To make sure
npx uses the latest version of
create-react-app you need to uninstall the global version installed with
npm uninstall -g create-react-app