Its popularity is due to its flexibility and simplicity, making it the first choice in the development of mobile and web applications. More than 90,000 use of the sites React including technical giants such as Facebook, Netflix, Instagram, Airbnband Twitter list a few.
In this article, you will learn how to install ReactJS on Ubuntu 20.04 and Ubuntu 18.04.
Step 1: Install NPM on Ubuntu
Second, npm is an open source online software registry that hosts 800,000 Node JS packages. Npm is free and you can easily download publicly available applications.
Install npm on Ubuntu Linux, log in to your server a sudo user and call the command below:
$ sudo apt install npm
When the installation is complete, you can check the version npm installed with the command:
$ npm --version 6.14.4 [Output]
The latest version at the time of this writing is v6.14.4 as described in the output.
Installation npm also install node.js and you can confirm the version node installed with the command:
$ node --version v10.16.0 [Output]
Step 2: Install the Create-Respond application
create-respond-application is a utility that allows you to configure all the necessary tools React Application. It saves a lot of time and energy by setting everything from scratch and giving you the lead you need.
Follow the steps below to install the tool npm command:
$ sudo npm -g install create-react-app
After installation, you can confirm the installed version by running:
$ create-react-app --version 4.0.1 [Output]
Step 3: Create and launch the First React application
Creating a React the application is quite simple and straightforward. We are going to create a response application called tecmint application as follows.
$ create-react-app tecmint-app
It takes about 5 minutes to install all the packages, libraries, and tools your application needs. Some patience is helpful.
If the application was created successfully, you will receive a notification below with basic commands that you can run to start managing the application.
Go to run the application application directory
$ cd tecmint-app
Then run the command:
$ npm start
After all, you’ll get the result below that shows you how to use the app in your browser.
Launch your browser and browse the IP address of your server
This indicates that the default value React the application is running. In this guide, we have successfully installed React JS and created the application React.
If you appreciate what we do here at TecMint, you need to consider:
TecMint is the fastest growing and most trusted community site for all kinds of Linux articles, guides, and books online. Millions of people visit TecMint! Search or browse thousands of published articles that are accessible to everyone.