DEV Community

Cover image for Getting Started with Create React App
Mark Harless
Mark Harless

Posted on

Getting Started with Create React App

Every week I'm writing a new blog post and most of the time I find myself writing about JavaScript and React. Instead of telling my readers to "Google it", I'm just going to write this blog post to link them when I talk about creating a React App!

Node Version

We first need to verify what version of Node and NPM your local machine is running. Go ahead and enter the following in your command line:

node -v && npm -v
Enter fullscreen mode Exit fullscreen mode

You'll need at least Node v6 or above and NPM v5.2 or above (to use npx instead of npm) for create-react-app to work.

Creating the React App

Now you can create your React App! Head to the directory you want to create it at and run:

npx create-react-app playground
Enter fullscreen mode Exit fullscreen mode

Keep in mind 'playground' can be changed to anything you want. This is just the title of your app. It will take a moment to install all the dependencies to run and build.

View Your Scripts

Now we're going to change directories and see the template React has created for us

cd playground
npm start
Enter fullscreen mode Exit fullscreen mode

A new browser should open up with your new template! You're now ready to get started on your first React App. Please see my other blog posts on more things React :)

Top comments (0)