UNPKG

@thibault.sh/hooks

Version:

A comprehensive collection of React hooks for browser storage, UI interactions, and more

10 lines (8 loc) 509 B
/** * Custom hook that creates a countdown timer based on a target date * @param countDownDate - Target date in milliseconds (timestamp) * @param refreshRate - Optional interval in milliseconds to update the countdown (defaults to 1000ms) * @returns A tuple containing [days, hours, minutes, seconds] remaining until the target date */ declare const useCountdown: (countDownDate: number, refreshRate?: number) => number[] | readonly [number, number, number, number]; export { useCountdown as default };