Installing CRA

CRA or create-react-app is a command line utility which bootstraps a beginning boilerplate template for a react application. 

It initializes a npm package, creates a boilerplate React application, sets up ES6 transpiler and even initializes git inside the directory


How to install create-react-app 

1. Open your terminal and type this command

sudo npm install -g create-react-app

i means install 

-g is a flag that installs a JavaScript package "globally" on your system. It means that the installed package isn't limited to that particular directory but can be accessed from anywhere on your machine. 

in all other cases when a package is used ONLY by that particular application, the global flag is not used. This way the package remains inside the "node_modules" directory of that particular package. We will soon learn about "node_modules" in next step, as it is quite a "heavy" topic to discuss, pun intended. 


Hurray 🥳 You have successfully installed create-react-app 


Note - 

Do note that you can go "without" globally installing create-react-app on your machine. we can use npx to call create-react-app without actually the need to install it on your machine. We will look into this in the next step. However, it is good to know all the methods and a personal preference to use any.