A component is a piece of UI that has its own logic and appearance. A component can be as small as a button or as large as an entire page or screen.
A component is a piece of the user interface that is separated, independent, and reusable. Different components are composed to build the complete user interface.
In simple words, A component is like a function that you can call anytime you need in our web app.
Whenever you need it you can use it by simply calling it by its name.
The component describes a part of the user interface.
They are reusable and can be nested inside other components.
A JavaScript function that returns some value is called a component. All components are functions, but not all functions are components.
Creating and composing together functions can directly apply to creating and composing components; however, instead of composing functions together to get some value, you can compose components together to get some UI.
components :
client-side components :
server-side components
client-side components and client-side components are two types :
1 . functional components
Normal functions
Arrow functions
2 . Class components
Create a component :