Conceptual
Login

useCallback Hook

useCallback(fn, deps) is useMemo for a function value: it returns the same function reference until a dependency changes, so memoized children (React.memo) and dependency arrays that receive the callback don't invalidate on every render. Since every render creates fresh function objects, referential identity — not the code inside — is what it stabilizes.

This Concept is waiting for its first lesson!

useCallback(fn, deps) is useMemo for a function value: it returns the same function reference until a dependency changes, so memoized children (React.memo) and dependency arrays that receive the callback don't invalidate on every render. Since every render creates fresh function objects, referential identity — not the code inside — is what it stabilizes.

Are you a teacher? Sign in to start contributing.

Sign In