useThrottleSignal

A hook that deal with the throttled signal.

Examples

Default usage

ThrottledValue:Hello

Default usage

ThrottledValue will change every 500ms.

API

const throttledValue = useThrottleSignal(  value: any,  options?: Options);
const throttledValue = useThrottleSignal(  value: any,  options?: Options);

Params

PropertyDescriptionTypeDefault
valueDefault valueany-
optionsConfig for the throttle behaviors.Options-

Options

PropertyDescriptionTypeDefault
waitThe number of milliseconds to delay.number1000
noLeadingSpecify not invoking on the leading edge of the timeout.booleantrue
noTrailingSpecify not invoking on the trailing edge of the timeout.booleantrue