What is a react component?
A React component can be thought of as a function or class that takes in some data and returns a React element, which describes how a section of the UI should appear. There are two main types of components. They are:
Components can be composed together, and a React application is essentially a tree of these components. The component-based architecture makes it easier to manage and maintain UI code, as each component is responsible for a specific piece of functionality or UI element.