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

Sessionstore

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 { sessionstore } from 'svu/store';
    let name = sessionstore('name', 'Unnamed');
</script>

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