How To Create A Simple React App

In this blog, you will learn how to create a simple React app.

Prerequisites

  1. Install Node.js and NPM

  2. Install Visual Studio Code

Create React app

  1. We will use create-React-app NPM package to create a simple React app.

  2. Open Node.js command prompt.

  3. Navigate to the respective folder, where you want to create React app.

  4. Type the command given below in a console to install create-React-app NPM package.

    npm install -g create-react-app

  5. Type the command given below in a console to create React app.

    create-react-app helloworld-demo

  6. Navigate to the helloworld-demo folder.

  7. Type the command given below in a console to open the code in Visual Studio code.

    Code

  8. React app will have the folder structure given below.

  9. Type the command given below in a console to launch React app in the Browser.

    NPM start

Summary

In this blog, you have seen how to create a simple React app.

Reference

https://www.npmjs.com/package/create-react-app
Ebook Download
View all
Learn
View all