This article explains how React handles component rendering when passed stable, static elements via props. By lifting static components out of parent render cycles, developers can avoid unnecessary re-renders because React recognizes that the element identity remains unchanged between renders.
Key points
React skips re-rendering a component if it receives the exact same element object as the previous render.
Passing components as children or props can effectively decouple them from the parent's state-driven re-render cycle.
Composition is a natural way to achieve performance optimization without relying exclusively on manual hooks like useMemo.
Legacy context usage can prevent this specific optimization pattern in React.