@gluestack-ui/hooks
Version:
Provides hooks used in gluestack-ui
11 lines (10 loc) • 347 B
TypeScript
/**
*
* @param defaultValue
* @param wait Wait Time for Debounce
* @param options options object default false
* @returns `[value, setValue]` value after update and setter function
*/
export declare function useDebouncedState<T = any>(defaultValue: T, wait: number, options?: {
leading: boolean;
}): readonly [T, (newValue: T) => void];