⚠️ The content of the docs have not yet been updated for the current version of svu.
https:// svu / store / resettable

Resettable

The resettable store is an extended svelte writable store that can be reset to its initial value through store.reset(). It works on any values including objects.

<script>
    import { resettable } from 'svu/store';
    const store = resettable(100);
</script>

<input type="range" min="0" max="100" step="1" bind:value={$store} />
<button on:click={store.reset}>Reset</button>