Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 388 Bytes

index.md

File metadata and controls

27 lines (18 loc) · 388 Bytes
category
Animation

useTimeout

Update value after a given time with controls.

Usage

import { useTimeout, promiseTimeout } from '@vueuse/core'

const ready = useTimeout(1000)
const { ready, start, stop } = useTimeout(1000, { controls: true })
console.log(ready.value) // false

await promisedTimeout(1200)

console.log(ready.value) // true