MCPcopy Create free account
hub / github.com/RobPruzan/react-scratch / useCallback

Function useCallback

src/react/core.ts:1520–1525  ·  view source on GitHub ↗
(
  fn: () => T,
  deps: Array<unknown>
)

Source from the content-addressed store, hash-verified

1518};
1519
1520export const useCallback = <T>(
1521 fn: () => T,
1522 deps: Array<unknown>
1523): (() => T) => {
1524 return useMemo(() => fn, deps);
1525};
1526const triggerReRender = ({
1527 capturedCurrentlyRenderingRenderNode,
1528}: {

Callers

nothing calls this directly

Calls 1

useMemoFunction · 0.85

Tested by

no test coverage detected