react-native-shared-state
Version:
Create shared states that can be connected to multiple react native components, allowing for simple global state management.
10 lines (9 loc) • 361 B
TypeScript
import { Element, Map } from '../types';
import { StateCache } from '../SharedState/StateCache';
export declare class MapCache<E extends Element, K extends keyof E> extends StateCache<Map<E>> {
defaultElements: E[];
key: K;
constructor(defaultElements: E[], key: K);
add(newElements: E[]): Map<E>;
remove(removeElements: E[K][]): boolean;
}