June 13, 2024

Creating a React app

Before we can create a new React app, ensure NPM (Node Package Manager) is installed. NPM is bundled with Node.js.

Install Node.js from here: https://nodejs.org/en/download/

Once installed, in a terminal enter the following to create a new React app:

npx create-react-app <app-name>

Then you can navigate to the newly created directory which will have the same name as your app and enter:

npm start

This will cause dependencies to be downloaded and your default app to be built. After it’s built your app will launch on your default web browser.

If this does not happen automatically then you can navigate to your app on http://localhost:3000/

Source – https://github.com/facebook/create-react-app