MCPcopy Create free account
hub / github.com/buqiyuan/react-antd-admin / useAsyncEffect

Function useAsyncEffect

src/hooks/useAsyncEffect.ts:13–17  ·  view source on GitHub ↗
(callback: Callback, deps: Deps = [])

Source from the content-addressed store, hash-verified

11 * @param deps dependences
12 */
13export default function useAsyncEffect(callback: Callback, deps: Deps = []) {
14 useEffect(() => {
15 callback().catch(e => console.log('useAsyncEffect error:', e));
16 }, deps);
17}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected