We have 2 types of components in React.
- class-components
- functional components
Functional Components
- simpler to write comparing to class-based functions
- mainly focus on the UI of the application, not on the behavior
- these are basically
render()
from the class component - can have state and mimic lifecycle events using hooks