use-async-effect

Execute useEffect but asynchronously

Modulo

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

Syntax

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

Last updated