A component is a piece or part of the user interface. The heart of all react applications is a component. Every react application contains at least one component and it can contain multiple components also. ReactJS allows us to create reusable components. There can be one root component (in our case it is the app component) and which can contain nested components like header, body, and footer components.

There are two types of components present such as,

  • Functional Component
  • Class Component

#react #reactjs

Component And Its Types In ReactJS
1.10 GEEK