Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 262 Bytes

use-async-effect.md

File metadata and controls

20 lines (14 loc) · 262 Bytes
description
Execute useEffect but asynchronously

use-async-effect

Modulo

import { useAsyncEffect } from "@atomico/hooks/use-async-effect";

Syntax

useAsyncEffect(async () => {
  await fetch("...");
});