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

Function useDebugValue

packages/react-debug-tools/src/ReactDebugHooks.js:421–430  ·  view source on GitHub ↗
(value: any, formatterFn: ?(value: any) => any)

Source from the content-addressed store, hash-verified

419}
420
421function useDebugValue(value: any, formatterFn: ?(value: any) => any) {
422 hookLog.push({
423 displayName: null,
424 primitive: 'DebugValue',
425 stackError: new Error(),
426 value: typeof formatterFn === 'function' ? formatterFn(value) : value,
427 debugInfo: null,
428 dispatcherHookName: 'DebugValue',
429 });
430}
431
432function useCallback<T>(callback: T, inputs: Array<mixed> | void | null): T {
433 const hook = nextHook();

Callers 15

useOuterFooFunction · 0.90
useOuterBarFunction · 0.90
useInnerBarFunction · 0.90
useDebounceFunction · 0.90
useCustomObjectFunction · 0.90
useDeepHookAFunction · 0.90
useDeepHookBFunction · 0.90
useDeepHookCFunction · 0.90
useDeepHookDFunction · 0.90
useDeepHookEFunction · 0.90
useDeepHookFFunction · 0.90
CustomHooks.jsFile · 0.90

Calls 1

pushMethod · 0.65

Tested by 7

useThemeFunction · 0.72
useFooFunction · 0.72
useCustomHookOneFunction · 0.40
useCustomHookOneFunction · 0.40
useCustomHookTwoFunction · 0.40
useCustomHookThreeFunction · 0.40
CounterFunction · 0.40