one-hook
Size
0.15 kb
View source

useDebounceValue

Debounce a value.

Installation

npm install @1hook/use-debounce-value

Usage

import {  } from '@1hook/use-debounce-value'

Debounce a state or a prop:

const  = (, 500)

// `debounced` will update 500ms after the last change of `value`

Pending indicator:

const  = (, 500)

const  =  !== 

On this page