UNPKG

@stencil/store

Version:

Store is a lightweight shared state library by the StencilJS core team. Implements a simple key/value map that efficiently re-renders components when necessary.

5 lines (4 loc) 235 B
import { ObservableMap } from './types'; export declare const createStore: <T extends { [key: string]: any; }>(defaultState?: T | (() => T), shouldUpdate?: (newV: any, oldValue: any, prop: keyof T) => boolean) => ObservableMap<T>;