useTimer API
A reactive timer composable with pause/resume support and remaining time tracking.
Related
Explore these related pages for additional context and usage patterns.
| Page | Category |
|---|---|
| useTimer | System |
| useRaf | System |
| createQueue | Registration |
Functions
useTimer
(handler: () => void, options?: TimerOptions) => TimerContextCreates a reactive timer with pause/resume support.
Options
duration
MaybeRefOrGetter<number> | undefinedDuration in milliseconds. Accepts a plain number, ref, or getter — the
value is read fresh each time start() is invoked, so reactive sources
can change between runs without recreating the timer.
Default: 1000