Skip to content

leafstark/vue-composition-toolset

Repository files navigation

vue-composition-toolset Travis (.com) Codecov

Minimalist design

Provide users with the simplest and most direct development experience

Install

Thanks for vue-demi, it works for both Vue 2 & 3.

npm i vue-composition-toolset

Usage

import { useTimerFn } from 'vue-composition-toolset'

export default {
  setup() {
    const doSomething = () => {
      /* your function */
    }
    const { trigger } = useTimerFn(doSomething, 30 * 1000) // The function will be executed every 30 seconds

    trigger.value = false // Disable the timer that executes the function
    trigger.value = true // Enable the timer that executes the function
  }
}

License

MIT License © 2021-PRESENT leafstark

About

Minimalist Design Vue Composition Utilitie

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published