react-native-mmkv
Version:
⚡️ The fastest key/value storage for React Native.
12 lines (11 loc) • 499 B
TypeScript
/**
* Use the boolean value of the given `key` from the given MMKV storage instance.
*
* If no instance is provided, a shared default instance will be used.
*
* @example
* ```ts
* const [isPremiumAccount, setIsPremiumAccount] = useMMKVBoolean("user.isPremium")
* ```
*/
export declare const useMMKVBoolean: (key: string, instance?: import("..").MMKV) => [value: boolean | undefined, setValue: (value: boolean | ((current: boolean | undefined) => boolean | undefined) | undefined) => void];