UNPKG

ra-core

Version:

Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React

13 lines 569 B
/** * Get a preference value from the store * * Relies on the store, using a key namespaced with the preference key from the PreferenceKeyContext * @example * * // when used inside a PreferenceKeyContext of value 'my-app' * const [theme, setTheme] = usePreference('theme', 'light'); * // this is equivalent to * const [theme, setTheme] = useStore('my-app.theme', 'light'); */ export declare const usePreference: <T = any>(key?: string, defaultValue?: T | undefined) => import("../store/useStore").useStoreResult<T>; //# sourceMappingURL=usePreference.d.ts.map