React.memo is a higher-order component that prevents unnecessary re-renders of child components when their parent component changes. It preserves the child component's previous render if its props haven't changed.
React.memo was designed to incorporate functionality similar to PureComponent and shouldComponentUpdate. It accepts two arguments:
- The component to be memoized
- An optional comparison function to determine if the component should re-render
By default, React.memo performs a shallow comparison of props. The comparison function works opposite to shouldComponentUpdate:
- true: Props are equal, skip re-rendering
- false: Props differ, proceed with re-rendering

Seonglae Cho