Closed ArnaudRinquin closed 7 years ago
As stated in #11, the first option is not possible as the payload
data is actually used and transmitted as the start
action payload.
Only the second option, having the promise in action.meta.promise
is available but the middleware should make sur to not propagate the promise in follow-up actions.
@ArnaudRinquin thanks for bringing up this issue and even opening up a PR to change it!
I've talked about this with a few people in the past and I don't think I am going to do this. redux-pack
is FSA compliant as is, because only FSA-compliant actions get fed to the reducers. This is no different than redux-thunk
where you are dispatching a function (which is not FSA compliant), but the function then in turn dispatches other actions.
Since this is a pretty common thing to bring up, perhaps it's a good idea to mention this in the README though.
because only FSA-compliant actions get fed to the reducers
Oh that's a good argument. Fair enough.
it's a good idea to mention this in the README though.
Yep.
While not critical, I think it'd be better if actions were FSA (flux-standard-action) compliant.
Instead of dispatching actions such as:
I suggest the actions to be on the form of either:
or
The changes required on the middleware would be small and back-compatibility could be provided.