In this lesson, we will see the tool which will Create React App. there is a GitHub repository it is called as Create React App you can see the repo here LINK. this is maintained by basically facebook or a community around facebook, so its an officially recommended tool for creating the react projects. so let’s start with installation.
We will install the Create react App GitHub repository globally using the NPM and NPM is simply node package manager, a tool that automatically get when installing NodeJS which makes easier to manage third party packages, over javascript packages and at the end Create React app is just such a package to use NPM we need to install NodeJS. So after installing the nodejs in mechine go to the terminal and use this command to install the Create react App package.
npm install create-react-app -g
-g
sudo npm install ...
After Installing the package we can finally create the new React app.
Once we have install the package we can go into the directory where we will store the code. After going into perticular folder you can type in this command
create-react-app burger-builder
It will automatically create a folder and install all the dependencies it needs.
once the setup is completed you can navigate into that folder with command cd burger-builder And after that simply run the command
cd burger-builder
npm start
After the command is initeated the browser will be open with the link http://localhost:3000/. this is the development server which loads our react app on port :3000 and reload the page when ever we change the code(file). Always keep this process running if you are working on your application.
http://localhost:3000/
:3000