Read the store current state
Subscribe a listener to state changes
The subscription returns a function to call to unsubscribe.
Lift and apply a reducer factory, returning a function that, given some arguments, will apply the reducer on the state and update the store current state with the result
Lift and apply a reducer factory, returning a function that, given some arguments, will apply the reducer on the state and update the store current state with the result
Generated using TypeDoc
Apply a reducer on the state and update the store current state with the result
import * as Store from 'store';
const store = Store.create(() => 2)();
store.apply(state => state + 1)();
store.read() // 3