timeoutFnStore

Wrapper for setTimeout with controls.

Demo

Please wait for 3 seconds

Usage

<script lang="ts">
import { timeoutFnStore } from 'svelte-legos';

const { isPending, start, stop } = timeoutFnStore(() => {
    /* ... */
}, 3000);
</script>