inline literal

An object, array or function written directly in JSX or the component body, which creates a brand-new value on every render.

In more detail

Passing style={{ color: "red" }} or onClick={() => ...} to a memoized child breaks its memoization because the prop is never reference-equal. Move it outside the component, or wrap it in useMemo or useCallback, when that matters.

Related terms

Taught in

References