This Gist shows one method of setting up localStorage with Sapper using if (process.browser).
Here is the assumed file structure inside the src directory used in this Gist:
└── src
├── components
│ └── Btn.svelte
├── routes
│ └── _layout.svelte
└── stores
└── store.js
Thank you! :)
by the way, found a little typo in
Btn.svelte
...on line 2 there is a missing'
:)