useDebounce

A custom hook that returns a debounced value and a function to update it programmatically.

Installation

import { useDebounce } from 'uxp/components';

Signature

function useDebounce(value: any, timeout: any, returnUpdateFunction: any): DebounceHook

Examples

const [debounced, updateValue] = useDebounceAdvanced(query);
const [debounced, updateValue] = useDebounceAdvanced(query, 500);
updateValue('manually set value');

Last updated