React is a flexible and lightweight library that improves the performance of an app but needs installation. React can be installed without the user configuration. The package manager can either be npm or yarn, and the tool is create-react-app. We will install via npm instead.

Note: Visual Studio Code will be used instead. To use the npm package to create a React app, install Node.

Follow the steps below to install React:
1. Open VS Code in any terminal (root directory).

code .

2. Open VS Code terminal, Ctrl + Shift + '
3. Navigate to the Desktop directory.

cd Desktop

4. Create a React app (my-app). For Windows.

npx create-react-app my-app

5. Create a React app (my-app). For Mac and Linux.

sudo npx create-react-app my-app

6. Change directory to project folder, my-app.

cd my-app

7. Start a development server.

npm start
react starter app on code sandbox

Note: The development server runs the app at port 3000 on your local machine by default, localhost:3000. If the port is different, it means another server is already running at port 3000.

If interested to install React online, try it on Replit.

create-react-app online on replit
  • Click the Shell navigation tab.
  • Follow steps 3–7.

The installation process is documented on the Facebook Github repository

Techstack article, sponsored by Flutterwave. Flutterwave is the easiest way to make and accept payments both online and offline from customers anywhere in the world. It is absolutely free!!! Sign up today.

Hi, I am Bello Osagie, a web developer. I teach web development for free… so join me and have fun learning. Let’s code together!!! 😎

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store