Tuesday, September 1, 2020

React Installation Using the create-react-app command

 

Using the create-react-app command

If you do not want to install react by using webpack and babel, then you can choose create-react-app to install react. The 'create-react-app' is a tool maintained by Facebook itself. This is suitable for beginners without manually having to deal with transpiling tools like webpack and babel. In this section, I will be showing you how to install React using CRA tool.

Install NodeJS and NPM

NodeJS and NPM are the platforms need to develop any ReactJS application. You can install NodeJS and NPM package manager by the link given below.


Install React

You can install React using npm package manager by using the below command. There is no need to worry about the complexity of React installation. The create-react-app npm package will take care of it.

npm install -g create-react-app  


Create a new React project

After the installation of React, you can create a new react project using create-react-app command. Here, I choose jtp-reactapp name for my project

create-react-app jtp-reactapp  


Running the Server

After completing the installation process, you can start the server by running the following command.

  1. cd jtp-reactapp  
  2. npm start  



4 comments: