Closed
Description
As rightly noted by @vslinko, it's better to provide getState
instead of initialState
.
I think I was wrong now when I said this. In fact, I find it now easier to implement composable dispatchers only if each “parent” has the ability to “intercept” both getState
and setState
, and if the child can “query” the latest state.
I'm going to keep this open for a while, as I'm still not 100% sure which approach is more correct, but I'm leaning towards (getState, setState) => action => ()
now as the signature for the dispatcher.
Metadata
Metadata
Assignees
Labels
No labels