Storage
You can restore the value of a named store to browser storage.
storage options
If you omit the storage option, it will reuse the existing storage alias for that name, and if there is no alias, in-memoryis the default. Specify storage when persistence is needed.
Lowercase storage names can be used in their basic form, and aliases for IndexedDB, WebSQL, localStorage, and sessionStorage are normalized to the same backend.
sessionstorage
sessionstorage and sessionStorage uses the browser's sessionStorage. Values are maintained within the current tab/session scope and will hydrate if recreated with the same name and storage option.
Example of saving user settings
The example below saves UI preferences to localStorage. If recreated with the same name and storage option after a refresh, it hydrates the saved value.