settings
Persist small pieces of user-specific data in localStorage, scoped to the current article and user.
getSettings
import { getSettings } from "@olenbetong/appframe-core";
let theme = getSettings<string>("theme");saveSettings
import { saveSettings } from "@olenbetong/appframe-core";
saveSettings("theme", "dark");API
export declare function getSettings<T>(setting: string, article?: string): T | null;
export declare function saveSettings<T>(setting: string, value: T | null, article?: string): void;Last updated
Was this helpful?