useThrottleValue ​
Hook that creates a throttled value and returns a stable reference of it
typescript
import { useThrottleValue } from '@siberiacancode/reactuse';
Usage ​
typescript
const throttledValue = useThrottleValue(value, 500);
Demo ​
Api ​
Parameters
Name | Type | Default | Note |
---|---|---|---|
value | Value | - | The value to be throttled |
delay | number | - | The delay in milliseconds |