Debounces state changes
Import
Usage
useDebouncedState
hook debounces state value changes. The state
will be updated after the delay time has passed since the last setState
call.
Playground
You can immediately update state with first setState
call by passing true
as the third argument.
Playground
Type definition