React
JavaScript
web development
beginners
programming
front-end development
tutorial

How to Install React: A Step-by-Step Guide for Beginners

Deepak Tewatia
September 5, 2025
3 min read

Introduction

Installing React can be easy! In this guide, we will walk you through each step. You will learn how to set up your computer and create your first React app. Just follow along, and soon you will start building fun projects with React. Let’s get started!

What You Need

Before we dive into the installation, here’s what you will need:

  • A computer with internet access
  • A web browser (like Chrome, Firefox, or Safari)
  • Node.js installed on your computer
  • A code editor (like Visual Studio Code, Atom, or Sublime Text)

Step 1: Install Node.js

Node.js is essential for running React and other JavaScript tools. Follow these steps to install it:

  1. Go to the Node.js website.
  2. Download the version labeled "LTS" (Long Term Support) for your operating system.
  3. Run the installer and follow the prompts. Make sure to check the box that says "Add to PATH."
  4. To confirm the installation, open your command prompt or terminal and type:
node -v

This command shows you the version of Node.js you have installed.

Step 2: Set Up a New React App

Now that you have Node.js, let’s create your first React app. We will use a tool called Create React App that makes setup easy.

  1. Open your command prompt or terminal.
  2. Choose a folder where you want to create your app. You can navigate to your desired folder using the cd command. For example:
cd path/to/your/folder
  • Run the following command to create a new React app:
npx create-react-app my-app

In this command, replace my-app with your desired app name.

Step 3: Start Your App

Once the installation is done, you can start your new React app. Here’s how:

  1. Navigate into your app’s folder:
cd my-app
  • Now, start the app by running:
npm start

This will open your app in the web browser, usually at http://localhost:3000.

Step 4: Explore Your App

Your React app comes with some files you can explore:

  • src: This folder has all your React components.
  • public: This folder has the main HTML file and other static files.
  • package.json: This file lists the packages your app needs.

Try editing src/App.js. Change some text and save the file. Your browser will automatically refresh, showing your changes!

Troubleshooting Common Issues

If you run into any problems, here are a few tips:

  • Make sure Node.js is properly installed by checking the version again.
  • If npx create-react-app fails, check your internet connection and try again.
  • If your app does not start, make sure you are in the correct folder.

Next Steps

Now that you have React installed and your first app running, you can start exploring more.

  • Learn about React components and how to create them.
  • Try adding some styles using CSS.
  • Check out React’s official documentation at reactjs.org for many resources and tutorials.

Building things with React can be a lot of fun. You have the skills to create amazing web apps. Enjoy coding!

Comments

Y
You
Commenting
0/2000
Loading comments…