@lumieslab/stasho
Version:
lightweight state management library
11 lines (10 loc) • 641 B
TypeScript
import { StoreDef, ReducerCallback, MemoryCallback, EffectCallback } from './interfaces/store-interfaces';
/**
* Creates a store that can be used to manage state and dispatch actions.
* @param initialState the initial state of the store
* @param reducers a list of reducers that will be applied to the state
* @param memories a list of memory which computes the state
* @param effects a list of effects that occur when an action is dispatched
* @constructor
*/
export declare const Store: <S>(initialState: S, reducers?: ReducerCallback<S, any>[], memories?: MemoryCallback<S, any>[], effects?: EffectCallback<any>[]) => StoreDef<S>;