React
JavaScript
Web Development
Frontend Development
Programming
Coding
Tech Tutorials

How to run React App

Deepak Tewatia
August 21, 2025
3 min read
How to run React App

If you're diving into web development, chances are you've heard a lot about React . It's a powerful library for building user interfaces. But, you might be wondering how to actually get your React app up and running. Let’s break it down step by step.

Step 1: Install Node.js

First, you'll need to have Node.js on your computer. Node.js is crucial because it helps you run JavaScript code outside of a browser. It also includes npm, which stands for Node Package Manager. npm is the tool you will use to install packages for your React app.

To check if Node.js is installed, open your terminal and type:

  node -v

If you see a version number, you’re good to go. If not, head over to the Node.js website, download the installer, and follow the instructions for your operating system.

Step 2: Create a New React App

Next, let's create your React app. You can do this easily using Create React App, a command-line tool that sets up everything for you. To do this, use the terminal and run the following command:

  npx create-react-app my-app

Replace "my-app" with whatever name you want for your project. This command may take a minute because it downloads all the files and packages you need.

Step 3: Navigate to Your Project Folder

Once the setup is complete, you need to go into your new project folder. Use the command:

  cd my-app

Now you're inside your project. This is where all your React code and assets will live.

Step 4: Start the Development Server

With everything set up, it’s time to start your app. In the terminal, type the following command:

  npm start

This command starts the development server. Your browser will open automatically, usually at http://localhost:3000 . There, you can see your React app live.

Making Changes to Your App

Now that your app is running, you can start making changes! Open your project in your favorite code editor. The main file you will be working with is src/App.js . This file contains the main component of your React app.

Try changing the text inside the <h1> tag and save the file. Your browser will automatically refresh to show the updates. This live reloading feature makes it easy to see changes in real-time.

Troubleshooting Common Issues

  • Port Already in Use: If you see an error about the port being in use, try closing any other server that may be running or use a different port with npm start -- --port 3001.
  • Missing Node.js: If it says "node not found", double-check your Node.js installation.
  • Can't Access localhost: Make sure no firewall or security software is blocking access to your local server.

Conclusion

And that’s it! You’ve set up and run your own React app. You can now start adding features, components, and styles to make it your own. React has a large community and plenty of resources available, so don't hesitate to explore further. Happy coding!

For more detailed information, check the official React documentation .