Leave Yamada UI a star

Star
Yamada UIYamada UIv1.7.2

useProcessing

useProcessing is a custom hook for handling processing states.

Source@yamada-ui/use-processing

Import

import { useProcessing } from "@yamada-ui/react"
Copied!

Usage

Editable example

const processing = useProcessing()

const onClick = () => {
  processing.start()

  setTimeout(() => {
    processing.finish()
  }, 3000)
}

return (
  <Button isLoading={processing.isLoading} onClick={onClick}>
    Click me
  </Button>
)
Copied!

Edit this page on GitHub

PrevioususePreviousNextusePromiseDisclosure