DEV Community

Cover image for How to create a React app

How to create a React app

Charity Parks
Full-Stack Software Engineer
・1 min read

Creating apps in React are my favorite!!! React is a really fun and simplistic JavaScript library. I used to always have to look up how to set up a new React single page app, so I thought this post could be helpful to someone new to React.

First check to see if you need to install npm. npm is the world's largest Software Registry. Its what developers use to share software. You can check to see if you have it and what version it is by typing this into the command line: npm -v . If you need to install it, then do so.

The easiest way, in my opinion, to start building a React app is by installing create-react-app. It comes with the newest JavaScript features, Babel and Webpack.

  • In the command line type: npm install -g create-react-app
  • After that installs: cd into the folder you want your app to reside.

Now to create a new app:

  • create-react-app PROJECT_NAME
  • cd into PROJECT_NAME
  • In the terminal type: npm start
  • In the browser go to: http://localhost:3000/

In my next post I will share my next steps to take to create an awesome React App!

Discussion (1)

ziv profile image

You can use ‘npx create-react-app app-name’ si you won’t need to install it globally