UNPKG

@rbxts/react-hooks

Version:

Generated by [Rojo](https://github.com/rojo-rbx/rojo) 7.4.0.

11 lines (10 loc) 615 B
/// <reference types="react" /> /// <reference types="@rbxts/compiler-types" /> /** * Creates a debounced state hook that returns a tuple containing the debounced state and a setter function. * * @param initialState - The initial state value. * @param [timeout] - The timeout in milliseconds for the debounce. If not provided, a default timeout of 500ms is used. * @return A tuple containing the debounced state and a setter function. */ export declare function useDebouncedState<T>(initialState: T, timeout?: number): LuaTuple<[T, import("@rbxts/react").Dispatch<import("@rbxts/react").SetStateAction<T>>]>;