Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/danielroe/hello-zero-nuxt.
Something went wrong. Try again.
1234567891011121314export function useInterval(callback: () => void, delay: number | null) { onMounted(() => { if (delay === null) { return }
const id = setInterval(callback, delay)
onUnmounted(() => { clearInterval(id) }) })}