React JS Environment Setup

Below are the steps to create a new React project using Create React App:

  1. first install the Node.js and npm (Node Package Manager) on your machine. Below are the steps to install:
    • Go to the Node.js website ( and download the latest version of Node.js for your operating system.
    • Run the installer package to install Node.js on your machine.
    • Open a command prompt or terminal window and run the following command to verify that Node.js is installed:
      • node -v
    • the installed version should  be displayed
    • run below  command to check npm version install:
      • npm -v
  2. Open a command prompt(Window OS) or terminal window (Mac OS) and navigate to the Workspace directory where you want to create your new project.
  3. once you navigated to workspace directory, then run the following command to install Create React App globally:
    • npm install -g create-react-app

create first react app:

  1. Once installed, run the following command from terminal to create a new React project:

npx create-react-app react-demo

      2. Navigate into the newly created project directory:

    cd react-demo

    3. Start the development server:

    npm start

    4. Open your browser and navigate to http://localhost:3000/. You should now see the default Create React App welcome screen as below:



      5. You have successfully created you first react app. The project’s source code can be found in the src directory.

       We prefer Visual Studio Code to open react app and to build react app. We will see this in our next lesson.

        Leave a Comment

        Your email address will not be published. Required fields are marked *

        Scroll to Top