storageSignal

W

A signal that uses a secondary storage system to store values, ideally beyond the lifetime of the application. When the signal is initialized it will check the store for an existing value and fallback to the initialValue if it wasn't present.

The storageSignal implementation requires a store to be specified, but two built-in implementations exist: localStorageSignal and sessionStorageSignal.

Built-in Browser Storage Signal with Custom Serialization
Custom Storage Example