useDebouncedValue

Delay a value until it stops changing for the given time.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

The debounced value follows the input 500ms after the last keystroke.

APIs

useDebouncedValue

const useDebouncedValue = <T>(
  value: T,
  wait: number,
  options?: { leading?: boolean },
) => [T, () => void]
Edit this page on GitHub