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

Function useEffect

packages/react-debug-tools/src/ReactDebugHooks.js:382–395  ·  view source on GitHub ↗
(
  create: () => (() => void) | void,
  deps: Array<mixed> | void | null,
)

Source from the content-addressed store, hash-verified

380}
381
382function useEffect(
383 create: () => (() => void) | void,
384 deps: Array<mixed> | void | null,
385): void {
386 nextHook();
387 hookLog.push({
388 displayName: null,
389 primitive: 'Effect',
390 stackError: new Error(),
391 value: create,
392 debugInfo: null,
393 dispatcherHookName: 'Effect',
394 });
395}
396
397function useImperativeHandle<T>(
398 ref: {current: T | null} | ((inst: T | null) => mixed) | null | void,

Callers 15

useDebounceFunction · 0.90
WarnOnMountFunction · 0.90
WarnOnUpdateFunction · 0.90
WarnOnUnmountFunction · 0.90
ErrorOnMountFunction · 0.90
ErrorOnUpdateFunction · 0.90
ErrorOnUnmountFunction · 0.90
ErrorAndWarningOnMountFunction · 0.90
ErrorAndWarningOnUpdateFunction · 0.90
ErrorAndWarningOnUnmountFunction · 0.90
CustomHooks.jsFile · 0.90
CanvasPage.jsFile · 0.90

Calls 2

nextHookFunction · 0.85
pushMethod · 0.65

Tested by 12

ComponentFunction · 0.72
useIsDarkModeFunction · 0.72
ComponentFunction · 0.72
useIsDarkModeFunction · 0.72
ComponentFunction · 0.40
ComponentFunction · 0.40
useIsDarkModeFunction · 0.40
useCustomFunction · 0.40
ComponentFunction · 0.40
AppFunction · 0.40
CounterFunction · 0.40
AppFunction · 0.40