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

Completely new dispatch for _FULFILLED and _REJECTED #25

Closed
tomatau opened this issue Nov 19, 2015 · 1 comment
Closed

Completely new dispatch for _FULFILLED and _REJECTED #25

tomatau opened this issue Nov 19, 2015 · 1 comment

Comments

@tomatau
Copy link
Collaborator

tomatau commented Nov 19, 2015

Currently we call next() inside the middleware for either rejected or fulfilled actions.

Say you want the _FULFILLED action to return a thunk for whatever reason, now we have some issues where the order or configured middleware limits this possibility. Alternatively you may need thunk actions to later dispatch promises! Right now we can't get both of these middleware to communicate without adding one of these middleware to our store configure twice.

An easy solution to this is to fire a completely new store.dispatch per _FULFILLED or _REJECTED instead of calling next.. this way other middleware inserted before promiseMiddleware can be applied to the _FULFILLED or _REJECTED action types.

@pburtchaell
Copy link
Owner

Ok, this is released in redux-promise-middleware@2.2.1. Closing.

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