When does a memoized component with React.memo re-render?
A memoized component wrapped with React.memo re-renders when its props change based on a shallow comparison. By default, React.memo performs a shallow equality check on the component's props objects. If any prop has a different reference than in the previous render, the component will re-render. Additionally, the component will re-render if it uses its own internal state or context that changes, regardless of props.