UNPKG

@toolpad/utils

Version:

Shared utilities used by Toolpad packages.

8 lines 327 B
/** * 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;