How to install and configure ReactJS on Fedora Linux?


ReactJS or React is an open-source front-end JavaScript library for building UI. You can use it as a base for developing single-page web or mobile applications. It is known for its flexibility and features like bringing HTML directly into JS.

ReactJS is developed and maintained by Facebook and community or individual developers and corporations.

In this article, I will discuss how to install and configure ReactJS on Fedora Linux.

Prerequisites

To follow this guide you should have a system running a recent version of Fedora and should have access to a user account with root permissions to it.

How to install ReactJS in Fedora

Follow the steps that are given below to install ReactJS on a Fedora machine.

Installing NPM

NPM or Node Package Manager is a package manager for JavaScript and an online database of free and paid JavaScript packages which is maintained by npm Inc.

Before installing a package make sure the packages on your system are updated –

sudo dnf update -y

Next, use the following command in your terminal to install NPM on a Fedora system –

sudo dnf install npm -y

You can verify the installation of npm by using –

npm --version

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-react-app --version

create app

Create your first React application in Fedora

You can use the following command to create your first React application on your Fedora system.

For example, to create an application named hello-react we will run the given command in our terminal –

create-react-app hello-react

Now to run this application first move to the directory of created application –

cd hello-react

And then use the following command to run it –

npm start

npm start

Open a browser and use the given URL to open the application –

http://server-ip:3000

OR use the given URL if you want to open it on your local system –

http://localhost:3000

This will display the output as given in the image below.

react app output

To explore more about ReactJS you can follow ReactJS Official Documentation.

Conclusion

Now I hope you have successfully set up ReactJS on your Fedora system.

If you have a query or feedback then write us in the comments below.

1 thought on “How to install and configure ReactJS on Fedora Linux?”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.