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

Function useLayoutEffect

packages/react-reconciler/src/ReactFiberHooks.js:4055–4063  ·  view source on GitHub ↗
(
      create: () => (() => void) | void,
      deps: Array<mixed> | void | null,
    )

Source from the content-addressed store, hash-verified

4053 return mountInsertionEffect(create, deps);
4054 },
4055 useLayoutEffect(
4056 create: () => (() => void) | void,
4057 deps: Array<mixed> | void | null,
4058 ): void {
4059 currentHookNameInDev = 'useLayoutEffect';
4060 mountHookTypesDev();
4061 checkDepsAreArrayDev(deps);
4062 return mountLayoutEffect(create, deps);
4063 },
4064 useMemo<T>(create: () => T, deps: Array<mixed> | void | null): T {
4065 currentHookNameInDev = 'useMemo';
4066 mountHookTypesDev();

Callers 15

ChildFunction · 0.50
LayoutEffectFunction · 0.50
ParentFunction · 0.50
ChildFunction · 0.50
CounterFunction · 0.50
CounterAFunction · 0.50
CounterBFunction · 0.50
AppFunction · 0.50
ParentFunction · 0.50
AppFunction · 0.50
ParentFunction · 0.50

Calls

no outgoing calls

Tested by 15

ChildFunction · 0.40
LayoutEffectFunction · 0.40
ParentFunction · 0.40
ChildFunction · 0.40
CounterFunction · 0.40
CounterAFunction · 0.40
CounterBFunction · 0.40
AppFunction · 0.40
ParentFunction · 0.40
AppFunction · 0.40
ParentFunction · 0.40