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

Function useInsertionEffect

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

Source from the content-addressed store, hash-verified

365}
366
367function useInsertionEffect(
368 create: () => mixed,
369 inputs: Array<mixed> | void | null,
370): void {
371 nextHook();
372 hookLog.push({
373 displayName: null,
374 primitive: 'InsertionEffect',
375 stackError: new Error(),
376 value: create,
377 debugInfo: null,
378 dispatcherHookName: 'InsertionEffect',
379 });
380}
381
382function useEffect(
383 create: () => (() => void) | void,

Callers 2

FooFunction · 0.50
CounterFunction · 0.50

Calls 2

nextHookFunction · 0.85
pushMethod · 0.65

Tested by 2

FooFunction · 0.40
CounterFunction · 0.40