Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
*/
356
export
function
useCallback(callback, args) {
357
currentHook = 8;
358
return
useMemo(() => callback, args);
359
}
360
361
/**
362
* @param {
import
(
'./internal'
).PreactContext} context
Callers
7
validateHookArgs.test.jsx
File · 0.90
Child
Function · 0.90
Router
Function · 0.90
Link
Function · 0.90
Comp
Function · 0.90
App
Function · 0.90
App
Function · 0.85
Calls
1
useMemo
Function · 0.85
Tested by
3
Comp
Function · 0.72
App
Function · 0.72
App
Function · 0.68
Used in the wild
real call sites across dependent graphs
searching dependent graphs…