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

Localstore

A writable store that is synced with localstorage. On mount it will read from localstorage and on set it will write to localstorage. It falls back to a standard resettable store

<script>
    import { localstore } from 'svu/store';
    let name = localstore('name', 'Unnamed');
</script>

<input bind:value={$name} />
<button on:click={name.reset}>Reset</button>