1.0.1 • Published 2 years ago

spin-delay-vue v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

spin-delay-vue

port from spin-delay

DO NOT test in SSR

Installation

With npm

npm install --save spin-delay-vue

With yarn

yarn add spin-delay-vue

With pnpm

pnpm add spin-delay-vue

Example

<template>
  <Spinner v-if="isLoading" />
  <template v-else>
    ...
  </template>
</template>

<script lang="ts">
import { useSpinDelay } from 'spin-delay-vue'

const { fetching } = useFetch('http://example.com');
const isLoading = useSpinDelay(fetching, { delayInMs: 500, minDurationInMs: 200 });
</script>
1.0.1

2 years ago

1.0.0

2 years ago