joshnuss / svelte-persisted-store

A Svelte store that persists to localStorage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document SSR support and behavior

PeppeL-G opened this issue · comments

It took some time to search for, but after a while I found #56 (comment):

By working server side, I mean it should not cause an error.

Local Storage is a client-side browser API, so on the server it returns the default value of the store. Please advise if you are seeing a different behavior.

Would it be possible to mention this in the docs (in the README file)? I guess most use Svelte with SvelteKit, and in SvelteKit (with SSR) this is a quite important piece of information.