Skip to content

useThrottleValue

Hook that creates a throttled value

utilities
medium
test coverage
Last changed: 6 months ago

Installation

Library
CLI
Manual
typescript
import { useThrottleValue } from '@siberiacancode/reactuse';

Usage

typescript
const throttledValue = useThrottleValue(value, 500);

Demo

Api

Parameters

NameTypeDefaultNote
valueValue-The value to be throttled
delaynumber-The delay in milliseconds

Returns

Value

Source

SourceDemo

Contributors

D
debabin
debabin
B
babin
babin

Released under the MIT License.