You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I bumped into a problem and i'm not sure if it's because of axios or this middleware,
but when I'm trying to return an updated array of elements, I need to pass index to the reducer
either it's not detecting it or i'm doing something wrong (bets on the ladder) as with
only type and payload I can hook into with with .then from the component where I dispatch the action, but with adding extra field I cannot
The text was updated successfully, but these errors were encountered:
oltsa
changed the title
Adding extra fields to action creator
Extra fields in action creator breaks detection of promise(?)
Feb 5, 2016
redux-promise depends on flux-standard-actions's isFSA method which defines a standard action to have four valid keys: type, payload, error, meta. Since your promise uses the payload property (otherwise redux-promise won't detect it), you have to stick the index into the meta object on the action.
return{type: ActionTypes.SOMETHING,payload: promiseInstance,meta: { index }}
I bumped into a problem and i'm not sure if it's because of axios or this middleware,
but when I'm trying to return an updated array of elements, I need to pass index to the reducer
either it's not detecting it or i'm doing something wrong (bets on the ladder) as with
only type and payload I can hook into with with .then from the component where I dispatch the action, but with adding extra field I cannot
The text was updated successfully, but these errors were encountered: