UNPKG

@mcastiello/simple-store

Version:

A simple state manager that can store data via a reducer function.

3 lines (2 loc) 288 B
import { ActionsDefinitions, GenericState, Reducer, Store } from "./types"; export declare const createStore: <State extends GenericState, Definitions extends ActionsDefinitions<keyof Definitions>>(reducer: Reducer<State, Definitions>, initialState?: State) => Store<State, Definitions>;