Building React Apps Locally

I was previously using CodeSandbox to develop my apps, but there were instances where the view wouldn't reload, and I couldn't troubleshoot the issue effectively besides refereshing the browser. It was a great option to start building apps in React, but building locally might be faster now that I've built a few, simple apps.

  • Inside terminal check that npm and node are installed and the versions are Node >= 8.10 and npm >= 5.6. npm -v and node -v
  • Create the app: npx create-react-app any-project-name
  • cd any-project-name
  • npm start
Create React App · Set up a modern web app by running one command.
Set up a modern web app by running one command.
Create a New React App – React
A JavaScript library for building user interfaces
Inside that directory, you can run several commands:

  npm start
    Starts the development server.

  npm run build
    Bundles the app into static files for production.

  npm test
    Starts the test runner.

  npm run eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd my-app
  npm start