What are Pure Components in ReactJS?

React.PureComponent is exactly the same as React.Component except that it handles the shouldComponentUpdate method for the users. When props or state changes, PureComponent will do a shallow comparison on both props and state. Component on the other hand won’t compare current props and state to next out of the box. Thus, the component will re-render by default whenever shouldComponentUpdate is called.