In Focus

Getting Started With ReactJS - Environment Setup

In this article, we will learn how to set up the environment for React development. First of all we need to install NodeJS.

NodeJS Installation

The first prerequisite that we need to work with ReactJS is NodeJS. So, let us see how to install NodeJS environment.

  • First, open the below link to go to NodeJS official download website from which we will download it.


Above, you can see that we have different options for NodeJS according to your platform download correct version.

Global Packages Installation

Once you have downloaded NodeJS, open NodeJS command prompt and write a simple command as shown below.


Once you run this command, ReactJS and its global package will install at your system. In this command, –g is used to make this package global so that we can run it from any location.

Create React App

For creating React App, we have to run a simple command.


Once you run the above command, the below screen will appear on your system.


You can see in the above image, a process bar is running. Once all processes are completed, the app will be created as shown in the below image.


Start npm

The next step is to run npm, which can be done by simply using two commands

  1. cd environmentsetupdemo- Where environmentsetupdemo is app name.
  2. npm start


Once you enter this command, Node.js command prompt will give you the following screen.


As soon as this window appears on the command prompt, one tab will be opened in web browser showing default React app page.