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

Function useEffectWrapper

compiler/packages/snap/src/sprout/useEffectWrapper.ts:14–18  ·  view source on GitHub ↗
(f: () => void | (() => void))

Source from the content-addressed store, hash-verified

12import {useEffect} from 'react';
13
14export default function useEffectWrapper(f: () => void | (() => void)): void {
15 useEffect(() => {
16 f();
17 }, [f]);
18}

Callers 8

FooFunction · 0.85
ComponentFunction · 0.85
ComponentFunction · 0.85
ComponentFunction · 0.85
ComponentFunction · 0.85
ReactiveVariableFunction · 0.85
FooFunction · 0.85
FooFunction · 0.85

Calls 2

useEffectFunction · 0.90
fFunction · 0.50

Tested by 8

FooFunction · 0.68
ComponentFunction · 0.68
ComponentFunction · 0.68
ComponentFunction · 0.68
ComponentFunction · 0.68
ReactiveVariableFunction · 0.68
FooFunction · 0.68
FooFunction · 0.68