Skip to content
This repository was archived by the owner on Jul 28, 2022. It is now read-only.
This repository was archived by the owner on Jul 28, 2022. It is now read-only.

can't use redux-thunk's withExtraArgument mechanism with @stencil/redux  #17

Open
@ntregillus

Description

@ntregillus

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:

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....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions