UNPKG

apprun

Version:

JavaScript library that has Elm inspired architecture, event pub-sub and components

9 lines 235 B
import { produce } from 'immer'; export function createState(fn) { return (state, ...args) => { return produce(state, (draft) => { fn(draft, ...args); }); }; } //# sourceMappingURL=createState.js.map