What is React.memo, and how does it help performance?

React.memo is a higher-order component that prevents unnecessary re-renders of functional components by memoizing them, thus improving performance.

const MemoizedComponent = React.memo(function MyComponent({ value }) {
  console.log("Rendered");
  return <div>{value}</div>;
});