A Component is one of the core building blocks of React. 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. You can see a UI broken down into multiple individual pieces called components and work on them independently and merge them all in a parent component which will be your final UI.
In react, a component represents a part of the user interface.
Example: The following application has 5 components i.e. Header, Sidenav, Main Content, Footer, and one component to contain every other component.
The Containing component is the main component in your application and usually name as App component
Each of the four nested components describes only a part of the user interface. However, all components come together to make up the entire application. Components are also reusable. The same component can use different properties to display different information. The component can contain another component. For eg - The app component contains the other components.
Components in React basically return a piece of JSX code that tells what should be rendered on the screen. In React we mainly have two types of components:
Types Of Components
In React we mainly have two types of components: