Interface: WagenStorageOptions
Defined in: wagen.ts:17
The storage options of createWagen.
Properties
| Property | Type | Default value | Description | Defined in |
|---|---|---|---|---|
crossTab? | boolean | true for local, false for session | Whether 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? | StorageInstance | an instance over localStorage | Replaces 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? | ErrorHandler | undefined | Called 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? | StorageInstance | an instance over sessionStorage | Replaces the session storage entirely. | wagen.ts:27 |