Install React.js on macOS

Steffo Dimfelt
Oct 10, 2020

Journey

  1. Preparation
  2. Installation
  3. Run application

1. Preparation

Before React can be installed, you need Node.js. Just follow this Node installation guide and you’ll be good to go.

2. Installation

Open your Terminal and print this line:

npx create-react-app my-application

Now it would take a little while for the installation to finnish.

3. Run application

Move into your folder:

cd my-application

And start the application with npm or Yarn, if you have had installed.

npm start
or
yarn start

The default port for the app is http://localhost:3000/ but if port 3000 is occupied by some other application, React will send a question if you want to close the occupied port or open the application in a different port. It is all your choice.

--

--

Steffo Dimfelt

Twentyfive years of graphic design. Six years of development. A lifetime of curiosity.