React is a flexible and lightweight library that improves the performance of an app. React can be installed without the user's configuration. The package manager can either be NPM or yarn, and the tool or package is create-react-app. We will install via npm instead.
Follow the steps below to install React:
1.) Open VS Code in any terminal (root directory).
2.) Open VS Code terminal,
3.) Navigate to the Desktop directory.
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.
7.) Start a development server.
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 follow the steps below:
- Click the Shell navigation tab.
- Follow steps 4 - 7.
The installation process is documented on the Facebook Github repository
After installation of React, the most relevant folders in the my-app project are structured as shown below:
my-app ├── README.md ├── node_modules ├── package.json ├── .gitignore ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json └── src ├── App.css ├── App.js ├── App.test.js ├── index.css ├── index.js ├── logo.svg └── serviceWorker.js └── setupTests.js
Techstack | Flutterwave
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! Also, you get a Flutterwave dollar barter card when you signup. Open an online store and take your business anywhere in the world.
Support what I do and push me to keep making free content.