First, we will need a few things: a text editor (VScode is my go-to), Node ≥ 8.10, and npm ≥ 5.6. Once these are in place run the following in your terminal.
This will create your first React app! From here you can start your app by writing npm start in your terminal. This will open your first application.
Create-React-App comes pre-bundled with a few things: the latest version of React, React-DOM, as well as the latest version of react-scripts, a dev dependency that manages all other dependencies that start, test, and build. All of these things come all wrapped up in a pretty package called “create-react-app”.
If you are wanting to cut back on the number of files you have in your program, you can absolutely download each package you want separately. One thing to know about create-react-app is that by itself it doesn’t handle backend logic or databases. Behind the scenes, React a way to connect any backend you want.
When you are fully completed with your app, you will want to run NPM run build. This creates a compiled, optimized build folder in your app.
If you want to learn more, check out:
- React — https://reactjs.org/docs/create-a-new-react-app.html
- Node.js.- https://nodejs.org/en/
- Npm and node — https://www.npmjs.com/get-npm
- VS Code- https://code.visualstudio.com/