Nabizada_Navid_Mansuri
2 min readJan 18, 2021

--

What Is a React.js ?

React 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

What’s React Component?

A React Component is one of the core building blocks of React Apps. In other words, we can say that every application you will develop in React will be made up of pieces called components. Components make the task of building UIs much easier.

1……… Functional Component :
In simple words, Functional components are javascript functions. By writing a javascript function, we can create a functional component in React Apps. To make React app efficient, we use functional components only when we are sure that our component does not require interaction with any other components. Functional components do not require data from other components. Below shows an example of the functional component in React:

2………. Class Components :
The class components are similar to the functional component but have some additional features that make the class component a little more complex than the functional components. The functional components do not care about the other components in your app whereas the class components can work with each other. We can pass data from one class component to another class component. Below shows an example of the class component in React:

3……….. Higher-Order Components
Higher-order component
or known under the abbreviation HOCs are the component which takes a component as input and returns the component as output but with extended functionalities. React Higher-Order Components are popular advanced React pattern to deploy reusable logic and functionality across React components. Below shows an example higher-order component that transforms and returns usernames in uppercase:

4………..Pure Components
PURE COMPONENT
is one of the most significant ways to optimize React applications. The usage of Pure Component gives a considerable increase in performance because it reduces the number of render operation in the application

So these are the react components that you should be aware of.

--

--

Nabizada_Navid_Mansuri

I am frond & DEV, I like to help people. Sometimes that means just listening over a cup of coffee; sometimes that means developing a solution for them.