ReactJS is developed and maintained by Facebook and community or individual developers and corporations.
In this article, I will discuss the steps to install ReactJS in Ubuntu Linux.
You should have access to a user account with superuser privileges.
Installing ReactJS in Ubuntu
Follow the steps that are given below to install ReactJS on your Ubuntu system.
Use the following command in your terminal to install NPM on a Ubuntu system.
sudo apt install npm -y
You can verify the installation of npm by using –
Install create-react-app utility
The create-react-app utility helps to set up all the tools required for building React applications. Use the following npm command to install this tool on your system –
sudo npm -g install create-react-app
You can verify the installation by checking its version –
Create your first React application
You can use the following command to create your first React application on your system.
For example, to create an application named hello-react we will run the given command in our terminal –
Now to run this application first move to the directory of created application –
And then use the following command to run it –
Open a browser and use the given URL to open the application –
OR use the given URL if you want to open it on your local system –
This will display the output as given in the image below.
To explore more about ReactJS you can follow ReactJS Official Documentation.
I hope you have successfully set up ReactJS on your Ubuntu system. Now for any query, you can write us in the comments below.