useAsync

useAsync is a custom hook that executes an asynchronous function and tracks its state.

Loading...

Usage

import { useAsync } from "@yamada-ui/react"
const { value, error, loading } = useAsync(async () => {}, [])