spin-delay-vue
v1.0.1
Published
port from [spin-delay](https://github.com/smeijer/spin-delay)
Downloads
2
Readme
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>