Skip to content

Interface: WagenStorageOptions ​

Defined in: wagen.ts:17

The storage options of createWagen.

Properties ​

PropertyTypeDefault valueDescriptionDefined in
crossTab?booleantrue for local, false for sessionWhether a write in another tab updates the refs here.wagen.ts:21
default?"local" | "session"'local'The storage a state uses when it names none.wagen.ts:29
local?StorageInstancean instance over localStorageReplaces the local storage entirely.wagen.ts:25
mode?StateMode'optimistic'The mode of every storage state that does not set its own.wagen.ts:31
onError?ErrorHandlerundefinedCalled when the browser refuses an operation. Without it, the failure passes silently.wagen.ts:23
prefix?string''Put in front of every key, and what keys and clear treat as their own.wagen.ts:19
session?StorageInstancean instance over sessionStorageReplaces the session storage entirely.wagen.ts:27

Released under the MIT License.