top of page

How to Install ReactJs | ReactJs Assignment Help

Updated: Jul 16, 2021



ReactJs:

  • React is a JavaScript library for building user interfaces (UI).

  • It is used to develop the frontend of any website.

  • Everything in React is called Component.

  • It helps in developing modern frontends which are more powerful, efficient, and fast.

  • React is designed from the start for gradual adoption, you can use as little or as much React as you need. Whether you want to create a small project, add some interactivity to a simple HTML page, or start a complex React-powered app.


Now let’s learn more about react by creating a project using react.


Step 1:- Installing Node Js

First, you should have Node Js installed on your system to create a react project which you can get by https://nodejs.org/en/


Step 2:- check everything is installed correctly

After installing node you can check that it is installed or not by using the command

Node -v






Now there should be npm installed on your system which comes along with Node js. Check that npm is installed or not by using the command

npm -v





NPM stands for Node Package manager:- It manages all the packages that you will install using npm command.


Now there should be npx installed on your system which also comes along with Node js. Check that npx is installed or not by using the command

npx -v





NPX stands for npm package runner:- npx is a npm package runner (where x stands for eXecute). This is used to run the packages that are on npm registry.


Step 3:- Installing create-react-app

Now we can install create-react-app using npx. As the name describes itself it is used to create react apps.


Command to install create-react-app


npm install create-react-app 

Step 4:- Creating first react app


Now once create-react-app is installed


We are ready to create our first react app


Command to create a fresh react app


npx create-react-app your-app-name

NOTE:- While creating a react app no capital letters are allowed, only small letters and numbers and - is allowed for the name of the app.


After all packages are installed you will see


Step 5:- Running our React app

Now would be wondering what npx create-react-app my-app command has done?


It has created a reactjs template project which can be modified.

It has also initialized a git repo for your project.


Now go to the folder demo-app (YOUR APP NAME)


Just run npm start


It will automatically start the development server on localhost port 3000


The template looks like this


There are more commands for react like one is


npm run build:- It is used to build a production react app



Codersarts is a top-rated website for students which is looking for online Programming Assignment Help, Homework Help, Coursework Help in C, C++, Java, Python, Database, Data structure, Algorithms, Final year project, Android, Web, C sharp, ASP NET, ReactJS to students at all levels whether it is school, college and university level Coursework Help or Real-time project.


Hire us and Get your projects done by computer science expert


If you have project or assignment files, You can send at contact@codersarts.com directly


bottom of page