starting value
setTimeout delay time
const [debouncedValue, setVal, val] = useDebounce<string>('intialValue', 500);
const func = () => setVal('newValue');
useEffect(() => {
console.log(debouncedValue);
}, [debouncedValue]);
Generated using TypeDoc
Updates a value using the debounce strategy. Commonly used with the useEffect hook to check when the returned 'debouncedValue' has been updated