MCPcopy Index your code
hub / github.com/react/react / useCallback

Function useCallback

packages/react-server/src/ReactFizzHooks.js:533–538  ·  view source on GitHub ↗
(
  callback: T,
  deps: Array<mixed> | void | null,
)

Source from the content-addressed store, hash-verified

531}
532
533export function useCallback<T>(
534 callback: T,
535 deps: Array<mixed> | void | null,
536): T {
537 return useMemo(() => callback, deps);
538}
539
540function throwOnUseEffectEventCall() {
541 throw new Error(

Callers

nothing calls this directly

Calls 1

useMemoFunction · 0.70

Tested by

no test coverage detected