Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumReactuseCallbackSingle-choice MCQ

A child wrapped in React.memo receives `onClick` created via useCallback with deps `[]`, but the handler reads `count` from the surrounding scope. What bug does this introduce?

const onClick = useCallback(() => { console.log(count); }, []);