Open ntregillus opened 5 years ago
Since @stencil/redux has the peer dependency, I expectd that I could use redux middle where Thunk.
However, the MapDispatchToProps method is not handling the middleware's ability to inject another parameter into the delegate.
for example. normal delegate actions looks like:
export function executeAction() { return (dispatch, getStore) { dispatch({type: MY_ACTION, ...}); }; }
and Thunk describes a feature withExtraArgument which should allow me to include my API Client the same way the getStore and dispatch actions are provided:
withExtraArgument
export function executeAction() { return (dispatch, getStore, apiClient) { dispatch({type: MY_ACTION, ...}); }; }
However the Stencil code is ignoring this middleware.... I was wondering why this doesn't work....
Note: I was able to work around this by adding another reducer to my state to provide the client via the getState() endpoint
Since @stencil/redux has the peer dependency, I expectd that I could use redux middle where Thunk.
However, the MapDispatchToProps method is not handling the middleware's ability to inject another parameter into the delegate.
for example. normal delegate actions looks like:
and Thunk describes a feature
withExtraArgument
which should allow me to include my API Client the same way the getStore and dispatch actions are provided:However the Stencil code is ignoring this middleware.... I was wondering why this doesn't work....