useCallback
useCallback is a React Hook that memoizes a function reference and reuses it across renders until its specified dependencies change.
React in Depth
useCallback is a React hook that memoizes a function reference between renders according to a dependency array.
- How it is used
- Stabilizes callback props so memoized React components can avoid re-rendering when unrelated parent state changes.
- How deep it goes
- Works through dependency selection, a functional state update, and typed callback placement; stops short of React hook internals.
- Examples
- Uses a deletable to-do list and a TypeScript playlist with memoized items and a shared move callback.
- What you can do after
- Apply it via React to keep callback props stable, choose dependencies, and type callbacks outside rendering loops.
React Hooks in Action: With Suspense and Concurrent Mode
useCallback is a React Hook that memoizes a function so its identity can remain stable across renders until specified dependencies change.
- How it is used
- Stabilizes functions passed through props or used as effect dependencies during shared-state coordination.
- How deep it goes
- Explains caching, dependency-triggered redefinition, effects, and memoized components without descending into React internals.
- Examples
- Uses a BookablesView updater passed to BookablesList and an effect that otherwise refetches endlessly.
- What you can do after
- Apply it via a dependency list to preserve function identity across renders and control dependent updates.
Read how React Hooks in Action: With Suspense and Concurrent Mode explains useCallback →
Related concepts
- memoizationuses · Memoization is an optimization technique that stores computation results with their inputs so equivalent later evaluations can reuse them without recomputation.
- dependency arrayused by · A dependency array is an array passed to a React effect or memoization Hook that specifies values whose changes trigger recomputation or rerunning.
- useMemoequivalent to · useMemo is a React Hook that caches a calculated value between renders and recomputes it when specified dependencies change.
- callbackkind of · A callback is a function or other callable supplied to software for invocation later in response to a specified event, condition, or point in execution.
- stable valueproduces · A stable value is a value whose identity remains unchanged across renders of a component.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

