Creating a ReactJS project

Now that you have ReactJS installed, you can create a new react project directory by running:

npx create-react-app my-react-project

This will create a new project directory named “my-react-project” that will look something like this:

A react project structure

You can then open a terminal window inside of this react project by running:

cd my-react-project

Once you’re inside a terminal window inside of this react project, you can finally run the following command to start a development server on “localhost:3000”:

npm start

local react development server


How to Install ReactJS on MacOS?

ReactJS is a free and open-source front-end JavaScript library created by Facebook in 2013. ReactJS is a User Interface (UI) library, and it is used for building and manipulating UI components.

In this article, we will be walking you through the full ReactJS installation process on MacOS in detail.  Here we will be covering:

  1. NodeJS and NPM installation.
  2. ReactJS library installation.
  3. Creating a ReactJS project.

Similar Reads

NodeJS and NPM:

In order to install ReactJS on MacOS, you must first have NodeJS and NPM installed. NodeJS is a JavaScript runtime which makes it possible to run JavaScript outside of the browser. NPM(node package manager) is used to install libraries such as ReactJS on the command line....

Installing ReactJS on MacOS:

Now that you have NodeJS and NPM installed, You should now be able to install ReactJS in your project’s directory by running:...

Creating a ReactJS project:

Now that you have ReactJS installed, you can create a new react project directory by running:...

Contact Us