UNPKG

rooks

Version:

Collection of awesome react hooks

12 lines (11 loc) 509 B
/** * A setTimeout hook that calls a callback after a timeout duration * when a condition is true * * @param callback The callback to be invoked after timeout * @param timeoutDelayMs Amount of time in ms after which to invoke * @param when The condition which when true, sets the timeout * @see https://rooks.vercel.app/docs/hooks/useTimeoutWhen */ declare function useTimeoutWhen(callback: () => void, timeoutDelayMs?: number, when?: boolean, key?: string | number): void; export { useTimeoutWhen };