You: why does my React component re-render?
Great question! Your component is re-rendering because you're creating a new
object reference on every render. When you pass an inline object as a prop, React treats it
as a brand-new value each time, which triggers a re-render of the child. To fix this, wrap
the object in a useMemo hook so the reference stays stable across renders.
New object ref each render. Inline object prop = new ref = re-render.
Wrap in useMemo.