MCPcopy
hub / github.com/preactjs/preact / useCallback

Function useCallback

hooks/src/index.js:356–359  ·  view source on GitHub ↗
(callback, args)

Source from the content-addressed store, hash-verified

354 * @returns {() => void}
355 */
356export function useCallback(callback, args) {
357 currentHook = 8;
358 return useMemo(() => callback, args);
359}
360
361/**
362 * @param {import('./internal').PreactContext} context

Callers 7

ChildFunction · 0.90
RouterFunction · 0.90
LinkFunction · 0.90
CompFunction · 0.90
AppFunction · 0.90
AppFunction · 0.85

Calls 1

useMemoFunction · 0.85

Tested by 3

CompFunction · 0.72
AppFunction · 0.72
AppFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…