Create React App

Developers at Facebook came up with a great tool called create-react-app, which sets up a complete React application for you. By running one command, it does all the necessary setup and configuration for you to immediately start working on your project.

Getting Started

If you want to create a react app named my-web-app, on terminal write:

npx create-react-app my-web-app

After installation finishes move to the folder that has the name of the app my-web-app

cd my-web-app

And then run

npm start

This will start a React app in the development mode on a http://localhost:3000

The page will automatically reload if you make changes to the code. You will see the build errors and lint warnings in the console.

You can open your browser on the folder (directory) of the project named my-web-app and see all the files and configuration that was set up by create-react-app command.

If you want to get a better understanding of how create-react-app works and which files it creates for you, make sure to check out this article

Last updated