React
React useCallback HookReact useCallback Hook
The useCallback Hook caches function definitions to improve performance.
Read Time
5 min readDifficulty
BeginnerLast Updated
Jun 15, 2026Version
v1.0.0Introduction
React recreates every function inside a component every time the component renders. If you pass these functions to child components, it causes unnecessary re-renders. The `useCallback` Hook caches the actual function itself so it doesn't get recreated.
Example
Example
Key Points
- It is almost identical to `useMemo`.
- `useMemo` caches the *result* of a function.
- `useCallback` caches the *function itself*.
- It prevents unnecessary child component renders.