Jeff Barczewski
Jeff Barczewski
Yes, currently successType limits you to a single type of action and it will decorate either what is called via dispatch or what is returned (when dispatchReturn is true, or...
Thanks for responding @cesarp. Yes, @ak99372 when using the original callback mode (with `process(deps, dispatch, done)` signature) then successType and failType decorate things that are dispatched, so `dispatch(obj)` would be...
Would a work around be to define a payload for the other action too? I'm sure there is a better way, but I wonder if that would work.
I believe I found a discussion of the same problem over in an issue on the redux repo, maybe there will be some ideas in there. https://github.com/reactjs/redux/issues/290
It looks like this PR was the result of many discussions for the flow types for Redux. It has a union of actions, so maybe this provides some clues on...
@ivoanastacio Thanks for posting the polymorphic approach. As I learn Flow better I'll post back any other ideas I come up with, but this seems to be the best way...
@lsentkiewicz Thanks for the question. As @jktravis mentioned you can return a promise (or result from async await) or an observable. It works great with async/await as you can imagine....
@intrepion thanks for mentioning it. I'll take a look and see if I can reproduce this and what might be causing it.
Thanks for the question @hadim and @skbolton. @skbolton you are on the right track here. There are many ways to approach it, but you tackled it the way I would....
@skbolton yes, that is correct it would not complete unless you fire the cancelType, then it would actually complete. You are both welcome!