The easiest way to create a new app with TypeScript using Create React App is to run this command in a console:
Or if you use
npx is a package runner that comes with npm 5.2+ and higher. It executes packages like
eslint and such.
create-react-app is a standard project creator from Create React App. It is used as the template for creating applications. It provides all the necessary dependencies and boilerplate code for a quick start.
--template typescript is a setting which tells CRA to set up a new application using TypeScript. It will create
.d.ts file and will set up
Now you can start the development server and see the result.