UNPKG

react-use-timer-hook

Version:

A React hook for managing countdown or count-up timers with pause, reset, and customizable callbacks.

23 lines 738 B
import type { UseTimerReducerOptions } from './useTimer.types'; /** * Custom reducer hook for timer state and actions. * @param options UseTimerReducerOptions configuration * @returns Timer state and reducer action methods */ export declare function useTimerReducer({ time, finishTime, countUp, autoStart }?: UseTimerReducerOptions): { start: () => void; tick: () => void; pauseTick: () => void; pause: () => void; reset: () => void; setTime: (value: number) => void; time: number; finishTime: number; isRunning: boolean; isPaused: boolean; pauseStart: number | null; totalPauseTime: number; pauseTime: number; countUp?: boolean; }; //# sourceMappingURL=useTimerReducer.d.ts.map