Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Create React App

React code cannot be executed natively from the browsers. That's because react, as we will later, has a unique way to mix HTML and JS together. This is something that no browsers are taught to read and render.

Thus after installing react and every package you need to use separately, we need to install also some packages that will transpile react code to something browser can understand and execute. This could be most of the times the @babel/core package and some presets. Then every time we want to compile our code in order to be executed properly we need to run a babel script or a webpack build command. This can take time and can cause a lot of pain to configure manually.

That's why we can install a specific script which is the create-react-app through command line. This comes with specific features, creating (or scaffolding) a ready-to-use application's folder structure, and comes with many handy scripts, for creating a dev-live-server (on reload without transpiling and 'building'). (hit npm start)

At the end, when we feel good about our application, we can 'build' the final folder that is going to be taken by the browsers. This 'build' folder contains the translated code from 'react' code to vanillaJS code. (hit npm run build)

p.s. It is strongly recommended that you revisit how to handle and initialize npm repository inside your project if you are not familiar with.

If you want to learn more regarding the installation process and more: