Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 315 Bytes

use-debounced.md

File metadata and controls

12 lines (8 loc) · 315 Bytes

useDebounced

Debounces the given value by a delay (represented in milliseconds). If delay is 0, then the value is returned synchronously. The default delay is 300ms.

Example

const [state, setState] = useState();

// Debounce `state` by 500ms.
const debouncedState = useDebounced(state, 500);