How to Install React JS and Create React App
How to Install & Setup React JS Application and create-react-app
In this post, you will learn how to install react js and create react app (application). So, to create a react app, you need have Node js and NPM installed in your system.
You’ll need to have Node >= 14.0.0 and npm >= 5.6 on your machine. To create a project & run:
Step 1: Install Node JS and NPM. if you don't have in your system.
Download Node JS Software from its official website URL
You will find NPM Software installation with Node JS. so, accept and install it.
To Check Node JS is installed or not, Open your terminal as follow with below command:
Step 2: Install NPM Globally with following command after NodeJS installation:
To Check NPM installed or not, follow with below command:
Step 3.0: Install create-react-app as follows:
if you have already install create-react-app and and its older version. lets un-install and again install by above command:
Step 3.1: Create a React Application as follows:
Create a root folder named reactjs and open your terminal with the folder path and give the below command to create react app:
After successfully creating your react app named as my-react-app-project.
Step 4: Run this command to move to the my-react-app-project directory:
Open your terminal and change the directory path to your project as reactjs/my-react-app-project as :
Step 5: Run this command to run the React application my-react-app-project :
After your react app starts, A new browser window will pop up with your newly created React App! with localhost:3000
If not, open your browser and type localhost:3000 in the address bar.
Thanks for reading.