memo
memo
let's you skip re-rendering a component if its props did not change. The component returned from the memo
function is said to be memoized. Normally in React all child components are re-rendered when their parent component
re-renders, that is not the case for memoized components as long as their props haven't changed.
memo(Component, arePropsEqual?)
The second argument arePropsEqual
let's you supply a function with custom logic to evaluate equality. The default equality comparison
uses Object.is
.