svelte-persistent-store
- Persists Svelte stores in
localStorageorsessionStoragefor state preservation across page reloads - Designed specifically for Svelte applications (not framework-agnostic)
- Provides persistent versions of Svelte's core store types:
writablereadablederived
- Uses JSON serialization to store values since web storage only accepts strings
- Key features:
- Simple API matching Svelte's native store interface
- Automatic synchronization between storage and store state
- Supports both localStorage (persistent) and sessionStorage (temporary) backends
Target audience: Svelte developers who need to maintain application state across page refreshes or browser sessions.
Storage interface specification
Svelte store documentation
svelte
Author
Featured Stories
No featured articles.