UNPKG

easy-peasy

Version:

Vegetarian friendly state for React

15 lines (12 loc) 254 B
import { debug, action, Action } from 'easy-peasy'; interface Model { logs: string[]; add: Action<Model, string>; } const model: Model = { logs: [], add: action((state, payload) => { const foo = debug(state); console.log(foo); }), };