On the path to becoming a cool kid, these days you can’t escape Facebook’s UI framework called React. Read all about it on the developer website for a more eloquent explanation than I’m going to provide, but basically, React manages a virtual DOM composed of stateful components and elements and intelligently updates the DOM to match. There’s lots of good info in the developer pages that I have yet to read but let’s get up and running first.

By the way, I’m on a Mac. The process will most likely differ for you PC people.

Our end goal is to install a handy command line tool called create-react-app. To get to that point we’ll need to install a few other things well. I’m going to assume you have basic understanding of the command line.

Let’s start by installing a handy utility called Homebrew, which is a package manager for OSX/macOS. Fire up that Terminal and paste the following:

Lots of things will download and be installed so let the magic finish. With your nifty package manager installed, now you can install NodeJS by simply typing:

Along with NodeJS, you’ll be getting npm (or Node Package Manager). Yes, a package manager installing a package manager. Mind blown. And yes, npm is lowercase unlike most acronyms. Don’t question the cool kids. With npm ready to go, we’re ready to finally install the create-react-app tool.

The “-g” flag here means that we’re installing this globally so that we have access to the module regardless of where we are in our filesystem. For a good explanation of this flag, you can check out this stackoverflow answer.

Nice work! We’re inching closer to actually being able to run our first React app. Now that we have our tool, let’s wield it. Back to the command line! Navigate to whatever directory you like to keep coding projects in and then:

Wait a bit. Change your laundry or wash your dirty dishes. Then once it’s done installing you’ll see the following message:

Follow the instructions and your browser should launch automatically once the dev server is up and running. Congratulations! You are now a cool kid by association. Let’s work on actually becoming a cool kid. The docs are your friend. I’ll be going through them as well so that I have something to write next time. Until then!