PureComponent
PureComponent a new improved version of (React.Compoment) .
PureComponent is a base class for React class-based components.
It implements shouldComponentUpdate lifecycle method
PureComponent is an advanced optimisation technique .
Optimisation because it has a potential to make your application faster

EX :class MyPureComponent extends React.PureComponent { ... }
Why to use PureComponent :
Both functional-based and class-based components have the same downside:
they always re-render when their parent component re-renders even if the props don’t change.

Also, class-based components always re-render when its state is updated (this.setState is called) even if the new state is equal to the old state.
when a parent component re-renders, all of its children are also re-rendered, and their children too,
lot of wasted re-renderings. Indeed, if our component only depends on its props and state, then it shouldn’t re-render if neither of them changed, no matter what happened to its parent component.
what PureComponent does ?
it stops the re-rendering cycle. PureComponent does not re-render unless its props and state change.

If you plan to implement your own shouldComponentUpdate in your component, then you can’t use (React.PureComponent).
If you do, you will get error “shouldComponentUpdate should not be used when extending (React.PureComponent).
Please extend React.Component if shouldComponentUpdate is used.”

When to use PureComponent :
You want to avoid re-rendering cycles of your component when its props and state are not changed, and
The state and props of your component are immutable, and
You don’t plan to implement your own shouldComponentUpdate lifecycle method.
On the other hand, you should not use PureComponent as a base for you component if:
Your props or state are not immutable, or
You plan to implement your own shouldComponentUpdate lifecycle method.