UNPKG

react-native-shared-state

Version:

Create shared states that can be connected to multiple react native components, allowing for simple global state management.

12 lines (11 loc) 420 B
import { StateCache } from './StateCache'; import { State, StorageOptions } from '../types'; export declare class StorageHandler<S extends State> { options: StorageOptions; stateCache: StateCache<S>; constructor(stateCache: StateCache<S>, options: StorageOptions); get(): Promise<S>; reset(resetData?: S): Promise<void>; save(saveData?: S): Promise<boolean>; private handleAppBackgrounded; }