UNPKG

tanstack-shadcn-table

Version:

A powerful, feature-rich React table component built on top of TanStack Table v8 with shadcn/ui styling. Optimized bundle size with 55% reduction through peer dependencies.

22 lines (21 loc) 693 B
/** * Custom hook for debouncing values * * @template T - The type of the value to debounce * @param value - The value to debounce * @param delay - The delay in milliseconds (default: 500) * @param callback - The callback function to call with the debounced value * * @example * ```tsx * import { useDebounce } from '@/lib/hooks/use-debounce'; * * const [searchTerm, setSearchTerm] = useState(''); * * useDebounce(searchTerm, 500, (debouncedValue) => { * // This will be called 500ms after the user stops typing * performSearch(debouncedValue); * }); * ``` */ export declare function useDebounce<T>(value: T, delay: number, callback: (debouncedValue: T) => void): void;