useDebounce

A hook that deal with the debounced signal.

Examples

Default usage

DebouncedValue:Hello

Default usage

DebouncedValue will change after the input ends 500ms.

API

const [state, setDebounceState, setState] = useDebounceSignal(  value: any,  options?: Options);
const [state, setDebounceState, setState] = useDebounceSignal(  value: any,  options?: Options);

Params

PropertyDescriptionTypeDefault
valueThe value to debounce.any-
optionsConfig for the debounce behaviors.Options-

Options

PropertyDescriptionTypeDefault
waitThe number of milliseconds to delay.number1000
atBeginSpecify invoking on the leading edge of the timeout.boolean-