@etsoo/toolpad
Version:
Dashboard framework extention based on Toolpad Core
9 lines (8 loc) • 328 B
TypeScript
/**
* This hook allows you to debounce any fast changing value. The debounced value will only
* reflect the latest value when the useDebounce hook has not been called for the specified
* time period.
*
* Inspired by https://usehooks.com/useDebounce/
*/
export default function useDebounced<T>(value: T, delay: number): T;