In this article, you will learn how to create React Js app and run it. To create a react js application make sure you installed Node.js and have an updated version of npm.
- Open terminal/command prompt
- Navigate to the path where we need to create a react application.
- Now run the following commands
npx create-react-app my-app
cd my-app
Note: npx commands supports only npm version >=5.2
If you are using npm version <5.2 then you need to run the following commands
npm install -g create-react-app
create-react-app my-app
cd my-app
In the above commands my-app represents your react application name, you can use any name in place of my-app.
By running the above commands you have created a new react application. To run your react application, run the below command.
npm start
Below you can find complete video tutorial.
That’s all about creating a new react application.