React Introduction

What is ReactJS?

React is a free and user-based open-source JavaScript framework mainly designed for the fast and efficient functioning of a Webpage. It involves dividing a webpage into several parts known as (Components).

The entire functioning of React revolves around creating components and their usability on various parts of the website. This can be further understood by taking a simple example.

Suppose you have a website containing 4 pages with the same (Navbar) being used on all the pages…..this is where React comes into the scene!! By using react, we will create a separate component containing the (Navbar) and this component can be used on all the pages as the Navbar is not going to change, which in turn will lead to better performance and optimization of the page.


ReactJS Installation

Install Node.js:-

Node.js provides a runtime environment to execute JavaScript code from outside a browser.NPM will be installed along with Node.js

Install Create-React-App Tool:-

The next step is to install (create-react-app) using NPM as given below

Running the React Application:-

In order to launch the React app type (npm start) in the terminal and the following screen will appear on the browser.