First, use shouldComponentUpdate
If false is returned, the page will not be rendered. If true, the page will be rendered
Second, the class component uses PureComponent (note that PureComponent is a shallow comparison)
Third, the function component uses memo (note that memo is also shallow comparison)