Interval fired: 0

useInterval

Reactive counter increases on every interval

Usage




 

import { useInterval } from '@vueuse/core'

// count will increase every 200ms
const { counter } = useInterval(200)

Type Declarations

export declare function useInterval(
  interval?: number,
  immediate?: boolean
): {
  stop: Fn
  start: Fn
  isActive: Ref<boolean>
  pause: Fn
  resume: Fn
  counter: Ref<number>
}

Source

SourceDemoDocs