create-react-app steps
create-react-app steps
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.
The Create React App is maintained by Facebook and can works on any platform, for
example, macOS, Windows, Linux, etc. To create a React Project using create-react-app,
you need to have installed the following things in your system.
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.
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.
For example, I will open App.js and make changes in its code which are shown below.
App.js
After completing the installation process, you can start the server by running the
following command.
1. > cd jtp-reactapp
2. > npm start
It will show the port number which we need to open in the browser. After we open it, you
will see the following output.