How to Install React JS and Create React App

By Guest | Dec 08, 2021 | React JS
Share : Whatsapp

https://www.fundaofwebit.com/post/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:

$ node -v


Step 2: Install NPM Globally with following command after NodeJS installation:

$ npm install -g npm

To Check NPM installed or not, follow with below command:

$ npm -v


Step 3.0: Install create-react-app as follows:

$ npm install -g create-react-app

if you have already install create-react-app and and its older version. lets un-install and again install by above command:

$ npm uninstall -g create-react-app


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:

$ npx create-react-app my-react-app-project

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 :

$ cd my-react-app-project


Step 5: Run this command to run the React application my-react-app-project :

$ npm start

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.