React Component Types(Latest)
To define a component, React provides us two JS syntax :
Function Based Component and Class Based Component.
We can use Class Based Component to manage state, perform side effects like loading data and working with DOM or responding to DOM event directly.
With the addition of hooks in React, now we can use functional component to manage state and side effects.
Note : Pure Components In React(React.PureComponent) are just a type of class based component where these components run shouldComponentUpdate by default during every re render phase. Don’t consider them as different types but as a subset of class based component.