In this blog, you will learn how to create a simple React app.
Prerequisites
-
Install Node.js and NPM
-
Install Visual Studio Code
Create React app
-
We will use create-React-app NPM package to create a simple React app.
-
Open Node.js command prompt.
-
Navigate to the respective folder, where you want to create React app.
-
Type the command given below in a console to install create-React-app NPM package.
npm install -g create-react-app
-
Type the command given below in a console to create React app.
create-react-app helloworld-demo
-
Navigate to the helloworld-demo folder.
-
Type the command given below in a console to open the code in Visual Studio code.
Code
-
React app will have the folder structure given below.
-
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