The React team has a official Command line Interface (CLI) for building React projects called "Create React App"; In this lesson, we show how to use this tool to quickly set up new projects using the create-react-app {project-name}
command. We then use the NPM scripts that is provided: to npm start
develop, to ship npm run build
, and to opt out of the npm run eject
abstracted too Ling.
The benefits of this tool is:
-It ' s officially maintained by the React team; This means best practices out of the box
-Zero config, one dependency
-Config is abstracted so React team can make improvements under the hood and you get the new goodness for free
-Clean command line output for errors
-Can "eject" at any time if needed
Install:
Install -G Create-react-app
Create a new app:
Create-react-app React-start
Remove react-scripts:
Eject
This would remove the react-script and back to normal.
[React] Set up React apps with zero Configuration