Middleware is now a function of:
(state: State) => (send: (msg: Msg) => void) => (msg: Msg) => void;
This gives middleware the ability to sample state.
Fxware now samples state, and the fx generating function signature
receives the state as the first argument.
Practically speaking, when I've used an fx manager in applications, I have occasionally wanted access to the program state when generating the effect. This gives middleware that opportunity.
Middleware is now a function of: (state: State) => (send: (msg: Msg) => void) => (msg: Msg) => void;
This gives middleware the ability to sample state.
Fxware now samples state, and the fx generating function signature receives the state as the first argument.
Practically speaking, when I've used an fx manager in applications, I have occasionally wanted access to the program state when generating the effect. This gives middleware that opportunity.