useDebounce
import { useDebounce } from '@sky-uk/ui-core';
The useDebounce
hook can be used to return a value only when a repeated action has been delayed for greater than a given time delay. Debounce is most suitably used for control events such as typing or button clicks.
Options
delay
The delay
option can be set in ms
. This option is defaulted to 500ms
.