Beta

useDebounce

React hook to apply a delay to a function.

Made by lucas
Instant value :
Debounced value :

Installation

Usage

const debouncedUpdate = useDebounce((val: string) => {
  setDebouncedValue(val);
}, 500);

Props

PropTypeDefault
callback
function
-
delay?
number
-