Languages
[Edit]
EN

React - create new TypeScript application

6 points
Created by:
Dollie-Rutledge
806

In this short article, we would like to show how in simple way create React TypeScript application from command line using npm.

Quick solution (run the command):

npx create-react-app my-new-app --template typescript

Where: my-new-app is the project name and directory that will be created.

Note: be sure the React is installed or install it with npm install -g react.

 

Application running

After application is created, should do the following steps to run the application:

1. Change working directory to the application directory:

cd my-new-app

2. Start the application using the command:

npm start

 

yarn package manager

We can use yarn package manager, too:

yarn create react-app my-new-app --template typescript

cd my-new-app
yarn start

 

See also

  1. React - create new JavaScript application

References

  1. Adding TypeScript - React Docs

Alternative titles

  1. React - create new TypeScript app
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join