redux-promise v redux-promise-middleware

redux-promise works (ie has been working for me in my current projects), but redux-promise-middleware returns ACTION_PENDING, ACTION_FULFILLED, and ACTION_REJECTED, plus what I was really looking for:

If you need to send extra information not included in the payload property, you can use the meta property.

const foo = () => ({
  type: 'FOO',
  payload: new Promise(),
  meta: {
    ...
  },
})

Btw, this was my first post written with the new WP5 blocks. Don’t like it, but give it a chance before I (try to) kill it. ~

Reply