How to Install and Run React on CentOS 8

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

React (also known as React.js or ReactJS) is an open-source, front end, JavaScript library for building user interfaces or UI components. It is maintained by Facebook and a community of individual developers and companies. React can be used as a base in the development of single-page or mobile applications. Below is the complete guide to install react on CentOS 8 machine.

Step 1: Install NodeJs Repository

curl -fsSL https://rpm.nodesource.com/setup_current.x | bash -

Step 2: Install development tools

To compile and install native addons from npm we must install build tools using below command

dnf install gcc-c++ make -y

Step 3: Installing Node JS

Use below command to install Node JS

dnf install nodejs -y

Now verify NodeJS and NPM is installed using below commands

node -v
npm -v

Step 4: Install React JS package

npm install -g create-react-app

Step 5: Installing and Starting react app

create-react-app unixcopapp

Now switch to project directory

cd unixcopapp

Finally, run react app using below command

npm start

Once you execute below command you will see following page on your browser.

Finally everything has been done according to plan. Now you can make changes to app files under “src” directory. Once you made changes, reload your react app and you will see new changes on your browser page.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Mel
Melhttps://unixcop.com
Unix/Linux Guru and FOSS supporter

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook