React Fundamental Topics

What is React?

React is a component-based javascript library, not a framework. It's the most popular library that helps to build user-interface. It's popular for simplicity and maintained by Facebook developers.

How React Works

Usually, if a small change in Html, Then Html generates full HTML DOM(Document Object Model). But React doesn’t do this. React create a virtual DOM and if any change in Html then compares the updated dom with virtual dom. Then render the different parts.


JSX(Javascript syntax extension) is like a valid javascript syntax. Any valid Html can write easily in JSX.

the above code heading is variable and assigns it valid Html it's call JSX.


A single page or User Interface consists of many blocks. User Interface breaks into separate parts. These separated parts are components. A component is independent and reusable. A component takes optional input and returns an element that renders on-screen. Two types of components in react. Functional and Class.

Functional Component

Class Component

This page consists of a lot of components. The components are separated by colors. Every separated part render separately.


Props mean properties. It's an optional input. It uses to send data to the component. They are immutable properties, which only useable cannot update or change.


A React component of class type maintains an internal state which acts as a data store for it. This state can be updated and whenever it is changed, React re-renders that component.

Component LifeCycle

Each component has a lifecycle. A lifeCycle complete with three phases Mounting, Updating, Unmounting. A component can monitor and manipulate phases.

I'm Fronted End and JavaScript developer.