redux-utilities / redux-promise

FSA-compliant promise middleware for Redux.
MIT License
2.67k stars 120 forks source link

Problem adding another param to the action #49

Closed aaronplanell closed 7 years ago

aaronplanell commented 7 years ago

Hello,

I've got a very weird issue. I have an action that works:

export function fetchMetadades() {
  const url = `${API_ROOT_URL}/${API_METADADES}`;
  const request = axios.get(url);

  return {
    type: FETCH_METADADES,
    payload: request
  };
}

But if I add another parameter, for instance:

export function fetchMetadades() {
  const url = `${API_ROOT_URL}/${API_METADADES}`;
  const request = axios.get(url);

  return {
    type: FETCH_METADADES,
    payload: request,
    newParam: "withANewValue"
  };
}

It doesn't work :fearful: What I'm doing wrong?

aaronplanell commented 7 years ago

Sorry. I applied the the solution of https://github.com/acdlite/redux-promise/issues/28 and it worked perfectly.