useTimeout
useTimeout
is a custom hook that executes a function after a specified number of milliseconds.
Import
import { useTimeout } from "@yamada-ui/react"
Usage
Editable example
const [state, setState] = useState<number>(1) useTimeout(() => setState((prev) => prev + 1), 3000) return <Text>Current state: {state}</Text>
Edit this page on GitHub