MCPcopy
hub / github.com/facebook/react / useCallback

Function useCallback

packages/react/src/ReactHooks.js:135–141  ·  view source on GitHub ↗
(
  callback: T,
  deps: Array<mixed> | void | null,
)

Source from the content-addressed store, hash-verified

133}
134
135export function useCallback<T>(
136 callback: T,
137 deps: Array<mixed> | void | null,
138): T {
139 const dispatcher = resolveDispatcher();
140 return dispatcher.useCallback(callback, deps);
141}
142
143export function useMemo<T>(
144 create: () => T,

Callers 15

ComponentFunction · 0.90
ComponentFunction · 0.90
ComponentFunction · 0.90
FooFunction · 0.90
ComponentFunction · 0.90
ComponentFunction · 0.90
useThunkDispatchFunction · 0.90
ComponentFunction · 0.90
ComponentFunction · 0.90

Calls 1

resolveDispatcherFunction · 0.70

Tested by 15

ComponentFunction · 0.72
ComponentFunction · 0.72
ComponentFunction · 0.72
FooFunction · 0.72
ComponentFunction · 0.72
ComponentFunction · 0.72
useThunkDispatchFunction · 0.72
ComponentFunction · 0.72
ComponentFunction · 0.72
ComponentFunction · 0.72
ComponentFunction · 0.72
ComponentFunction · 0.72