Reading Time:- 1 min 55 sec
Reading Time:- 1 min 05 sec
For, installing ReactJs in our machine we have to first install NodeJs in our machine.
For installing NodeJs please refer to this article.
→ A 3 step guide to download and install Node.Js
After installing the NodeJs in your machine open any terminal like cmd or any other terminal which you are using in your machine. When we newly install NodeJs, npm also comes with that. npm is a node package manager which helps us to download & install packages on our machine.
After opening any terminal we have to run the below command
npm install -g create-react-app
This command will install the
create-react-app package in your machine. The
create-react-app package helps us to create the ReactJs app.
Downloaded create-react-app package
create-react-app <app name>
This command creates a new react app with a provided name with that this command also downloads & install react, react-dom, and all necessary packages which are used to run a react app. when we create a first react app it takes a little bit of time.
The above image is the file structure of our project which is the default that comes with React.
After installing and creating a new react app type the below commands to start the react server.
cd <app name>
After, executing the npm start command your react app runs on port no
http://localhost:3000 in your browser and see your react app is working.
React App Started
Congratulations, now you can able to start a new react app and run it into your browser.
If you find any difficulty plz comment down below.