Local Environment Setup for React Development (Mac)

  1. Check Node is up to date
  2. Install VSCode (optional)
  3. Create React app
  4. Run app

1. Check Node is up to date

Go to https://nodejs.org/en/

The left button shows the latest stable version of Node. In this case, it’s 12.18.1

Check your Node version in Terminal with this command:

node --version

Make sure your version is the latest stable version.

2. Install VSCode

You don’t have to use VSCode as your code editor, but many recommend it because it has a lot of extensions that make it really easy to work with React.

Go to https://code.visualstudio.com. Download for Mac

3. Create React app

In Terminal:

npx create-react-app my-app

If that doesn’t work, install with npm or yarn:

npm init react-app my-app
yarn create react-app my-app

4. Run app

cd my-app
npm start or yarn start

You should automatically be taken to your browser. It should show this page:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s