IntervalControls
interfaceSource L7Type contract for IntervalControls.
interface IntervalControlsMembers
| Name | Type |
|---|---|
pause | () => void |
resume | () => void |
isActive | boolean |
Open-code aq-ui React hook for Use Interval.
pnpm dlx aq-ui@alpha add use-intervalImport the parts you need, then jump to an export for its contract.
"use client"
import { useInterval } from "@/hooks/use-interval"Type contract for IntervalControls.
interface IntervalControls| Name | Type |
|---|---|
pause | () => void |
resume | () => void |
isActive | boolean |
Open-code aq-ui React hook for Use Interval.
function useInterval(callback: () => void, delay: number | null, { autoStart = true, immediate = false }: UseIntervalOptions = {}): IntervalControlsIntervalControls| Name | Type | Default |
|---|---|---|
callback | () => void | — |
delay | number | null | — |
options? | UseIntervalOptions | {} |
Type contract for UseIntervalOptions.
interface UseIntervalOptions| Name | Type | Default |
|---|---|---|
autoStart? | boolean | true |
immediate? | boolean | false |
use-latest