Utilities
The library exports a small set of utility functions and constants from @xocialive/ui-components/utils (or the default barrel).
Exports
| Export | Type | Description |
|---|---|---|
PREFERENCE_KEYS | Constant | All localStorage key names |
DEFAULT_PREFERENCES | Constant | Default values for each preference |
loadPreferencesFromStorage | Function | Reads preferences from localStorage as a typed object |
savePreferencesToStorage | Function | Writes preferences to localStorage |
type PreferenceKey | Type | Union of all valid preference key strings |
Import
import {
PREFERENCE_KEYS,
DEFAULT_PREFERENCES,
loadPreferencesFromStorage,
savePreferencesToStorage,
type PreferenceKey,
} from "@xocialive/ui-components/utils";
See also
- Preferences — full reference
- API Error Handler