The PR “cleans up” a form by wrapping every event handler in useCallback and every derived boolean in useMemo . The commit message says “performance.” There is no profile, no skipped render that mattered, and two stale-closure bugs in the validation path.
I’ve started treating agent-added useMemo / useCallback without a stated reason as noise , not as an optimization. React is not cheaper just because the call site looks official. The wrappers are extra dependencies to get wrong.
Why the wrap is usually cargo cult
The model has been trained on a lot of “always memoize callbacks passed to children” advice. Some of that advice was aimed at class components, or at a child wrapped in memo that actually sits in a hot list. A one-off <Button onClick={...}> in a settings page is not that situation.
useMemo also lies about cost. Memoizing a boolean const isEmpty = items.length === 0 is slower to think about than the comparison.…