TimerControls
interfaceSource L7Type contract for TimerControls.
interface TimerControlsMembers
| Name | Type |
|---|---|
clear | () => void |
reset | () => void |
isActive | boolean |
Open-code aq-ui React hook for Use Timeout.
pnpm dlx aq-ui@alpha add use-timeoutImport the parts you need, then jump to an export for its contract.
"use client"
import { useTimeout } from "@/hooks/use-timeout"Type contract for TimerControls.
interface TimerControls| Name | Type |
|---|---|
clear | () => void |
reset | () => void |
isActive | boolean |
Open-code aq-ui React hook for Use Timeout.
function useTimeout(callback: () => void, delay: number | null, { autoStart = true }: UseTimeoutOptions = {}): TimerControlsTimerControls| Name | Type | Default |
|---|---|---|
callback | () => void | — |
delay | number | null | — |
options? | UseTimeoutOptions | {} |
Type contract for UseTimeoutOptions.
interface UseTimeoutOptions| Name | Type | Default |
|---|---|---|
autoStart? | boolean | true |
use-latest