In this article, we will learn how to install react js on windows 10.
What is React JS?
The first step is to download the Node.js installer for Windows from this site:
finish the installation process carefully.
STEP 2 :
Open command prompt or node.js command prompt as shown below
Make a new directory using the command
then move to the newly created directory as
STEP 3 :
In step 3, We will install React JS on your windows system for that we have to create a package.json file and make sure that you are in the newly-created directory. For that run command
press enter-enter until it completes asking the info, you can enter your own description for code like my first react project, etc.
Install React and other modules using
C:\Users\myreact>npm install --save react
C:\Users\myreact>npm install --save react-dom
STEP 4 :
We will install Create-React-APP package to simplify the process of creating and installing react into your projects for that we need to enter the command,
C:\Users\myreact>npm install -g create-react-app
To create a new project and deploy react into it we run the command as
The process will take up to 5 minutes to complete.
STEP 5 :
To run a React project you need to go at project1 by
will run the application.
If you carefully followed above 5 steps then your default browser will open the App.js file. You can edit the App.js file as per your code.
Happy Coding ...!!!!!!!!!!!