Here’s how to quickly create a React app in TypeScript, assuming Node with npm is already installed:
npm install -g create-react-app
create-react-app app-name --scripts-version=react-scripts-ts
This will create a starter React TypeScript project with all modules and dependencies under the “app-name” folder. The following TypeScript specific npm packages will be locally installed as dev dependencies:
It will also install tslint as a local package.
It will also create the following TypeScript specific files in your project:
Note that you will need to reorganize this dependency list when you want to deploy your project to Heroku so that it can be built remotely.
To start the app, cd into the app directory and execute:
Once you generate your React starter project, you can check my guide on how to import existing code into Github.