UNPKG

react-native-shared-state

Version:

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

11 lines (10 loc) 306 B
import { State } from '../types'; export declare class StateCache<S extends State> { default: S; current: S; prev: Partial<S>; constructor(defaultState: S); private _initialise; reset(resetData?: S): void; updateProp<Key extends keyof S>(key: Key, newValue: S[Key]): boolean; }