These are the UI elements of your website. A component can be:
- Button
- Input
- Entire page (root component) Every JavaScript component is a function that returns JSX
Example Component (Button)
Component Types
Functional Component
Returns JSX that describes the UI. Most common way to write components now Used to be the only component that can’t use states, now all classes components can use states with ReactJS Hooks
Class Component
Class extending another component class. Used to be the only component that can use states, now all classes components can use states with ReactJS Hooks