React is an open-source, front end, JavaScript library used for building user interfaces or UI components. It is maintained by Facebook and community of individual developers. React can be used as a base in the development of single-page or mobile applications. In this article you will learn how to install react on CentOS 8

Install NodeJs Repository

curl -fsSL | bash -

Install Necessary Development Tools

we must install build tools using below command to compile and install native add-ons from npm

dnf install gcc-c++ make -y

Install NodeJS

Run following command to install NodeJS

dnf install nodejs -y

Now verify NodeJS and NPM installation

node -v
npm -v

Install ReactJS package

npm install -g create-react-app

Starting react app

create-react-app unixcopapp

now switch to project direcotry

cd unixcopapp

Finally, run react app using below command

npm start

once you execute below command you will see similar page on your web browser.

Now you can make changes to app files under “src” directory then reload your react app and you will see new changes on your browser page.