Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 645 Bytes

index.md

File metadata and controls

32 lines (22 loc) · 645 Bytes
category
Utilities

useDebounceFn

Debounce execution of a function.

Debounce is an overloaded waiter: if you keep asking him your requests will be ignored until you stop and give him some time to think about your latest inquiry.

Usage

import { useDebounceFn } from '@vueuse/core'

const debouncedFn = useDebounceFn(() => {
  // do something
}, 1000)

document.addEventListener('resize', debouncedFn)

Related Functions

  • useThrottle
  • useThrottleFn
  • useDebounce
  • useDebounceFn

Recommended Reading