Easy To Learning
  • Login
  • Sign Up
  • Q&A
  • Home
  • Php Tutorial
  • MySql Tutorial
  • Object-Oriented Programming
  • Java Tutorial
  • HTML Tutorial
  • React JS Tutorials
  • Free Projects
  • Blogs & Articles
  • Others
    • About Us
    • Contact Us
How to install React
Easy To Learning

Education Needs Complete Solution

Online Ask Question Question And Answer
  1. Home
  2. React JS Tutorials
  3. How to install React

React JS Tutorial

Modern Javascript Core Concepts

  • Modern Javascript Core Concepts
  • Variables
  • Arrow functions
  • Rest and spread
  • Object and array destructuring
  • Template literals
  • Class
  • Callbacks
  • Promise
  • Async Or Await
  • ES Modules

React Js Basic Fundamentals

  • React JS Introduction
  • How to install React

How to install React

How to install React and what is the requeirment

Pre-requisite for ReactJS

  1. NodeJS and NPM
  2. React and React DOM
  3. Webpack
  4. Babel

Ways to install ReactJS

Using the create-react-app command


Install NodeJS and NPM

NodeJS and NPM are the platforms need to develop any ReactJS application. You can install NodeJS and NPM package manager by the link given below.

https://nodejs.org/en/

After Installation check npm version and verify installed successfully or not.

npm -v

Create a root folder with the name reactprojects on the desktop or where you want. Here, we create it on the desktop. You can create the folder directly or using the command given below.

mkdir reactprojects
cd reactprojects

Create React App Using npm

npm install -g create-react-app

Create a new React project

After the installation of React, you can create a new react project using create-react-app command. Here, I choose reactfirstproject name for my project.

create-react-app reactfirstproject


NOTE: You can combine the above two steps in a single command using npx. The npx is a package runner tool that comes with npm 5.2 and above version.

npx create-react-app reactfirstproject

The above command will install the react and create a new project with the name reactfirstproject. This app contains the following sub-folders and files by default which can be shown in the below image.

Now, to get started, open the src folder and make changes in your desired file. By default, the src folder contain the following files shown in below image.

For example, I will open App.js and make changes in its code which are shown below.

App.js

import React from 'react';  
import logo from './logo.svg';  
import './App.css';  
  
function App() {  
  return (  
    <div App\View\Helper\ShortCodeHelper="App">  
      <header App\View\Helper\ShortCodeHelper="App-header">  
        <img src={logo} App\View\Helper\ShortCodeHelper="App-logo" alt="logo" />  
        <p>  
          Welcome To Easytolearning.  
  
      <p>To get started, edit src/App.js and save to reload.</p>  
        </p>  
        <a  
          App\View\Helper\ShortCodeHelper="App-link"  
          href="https://reactjs.org"  
          target="_blank"  
          rel="noopener noreferrer"  
        >  
          Learn React  
        </a>  
      </header>  
    </div>  
  );  
}  
  
export default App;  

After completing the installation process, you can start the server by running the following command.

cd reactfirstproject  
npm start

It will show the port number which we need to open in the browser. After we open it, you will see the following output.

Free Download Projects
Previous Chapter
Next Chapter

Ask a Question

Have a coding query or doubt? Ask here and get help from our community.

500 characters remaining
Submitting...
Free Download Projects
Join Telegram Group Join WhatsApp Group

Member Sign In

Forgot?
Signing in...

Don't have an account? Register here

Create Free Account

Register Captcha
Registering...

Already have an account? Sign In

Ask a Question

500 characters remaining
Submitting...

About Easy To Learning

Easy To Learning is a comprehensive programming learning portal offering free, practical, developer-driven tutorials for PHP, Java, Python, Spring, MySQL, CSS, Bootstrap, CakePHP, and more.

Explore community-contributed questions and answers, and download ready-to-run source code projects.

Quick Links

  • Home
  • Questions & Answers
  • Download Projects
  • Blog & Articles
  • Member Login

Community

  • Telegram Group
  • WhatsApp Community
  • Ask a Question
  • Join as Member

Connect With Us

Stay updated with our newest programming tutorials and free open source projects.

© 2026 Easy To Learning. All Rights Reserved.