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.
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
-gis a flag which will install the package globally no matter from where you run this command.
2. In Mac or Linux you will have to run with the
sudo npm install ...to get the right permission of that command. And you will be prompted for your password.
After Installing the package we can finally create the new React app.
Create 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
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
And after that simply run the command
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.