Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of multiple injections of the same type. #93

Open
hanucito opened this issue Jan 14, 2021 · 1 comment
Open

Support of multiple injections of the same type. #93

hanucito opened this issue Jan 14, 2021 · 1 comment

Comments

@hanucito
Copy link

hanucito commented Jan 14, 2021

I want to abstract certain reusable logic that uses withPostFailure and withPostSuccess injections. But, I don't want this to override injections if they are already defined in the action.

Example

{
  ...,
  someAction: () => ({
    ...,
    injections: [
      withPostSuccess(async (dispatch, response) => {
        // some code
      }),
      withPostSuccess(async (dispatch, response) => {
        // some code
      }),
    ],
  }),
}

Current Behaviour

Only the last withPostSuccess is called.

Expected Behaviour

Both withPostSuccess are called.

@mvbattan
Copy link
Contributor

I'll check this while I have free time, it isn't a difficult addition !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants