useProcessing
useProcessing
is a custom hook for handling processing states.
Import
import { useProcessing } from "@yamada-ui/react"
Usage
Editable example
const processing = useProcessing() const onClick = () => { processing.start() setTimeout(() => { processing.finish() }, 3000) } return ( <Button isLoading={processing.isLoading} onClick={onClick}> Click me </Button> )
Edit this page on GitHub