title: Action doesn't reach reducer, react-redux this.props dispatch
body: <p>I am new to react-redux and I am trying to put together a little web app, while i pick up best practises and understand the framework. My problem is that the ecosystem is so diverse that i am not always sure why things look different. </p>
  
  <p>I am looking at the boilerplate bellow,
  <a href="https://github.com/choonkending/react-webpack-node/blob/master/app/containers/LoginOrRegister.jsx" rel="nofollow">https://github.com/choonkending/react-webpack-node/blob/master/app/containers/LoginOrRegister.jsx</a></p>
  
  <p>My code is identical for the most part but while it appears that the action is called, it doesn't reach the reducer, or the action is called but not actually dispatched.</p>
  
  <p>I can't get it to work and i just can't figure out what am i missing there, and it makes me feel stupid.</p>
  
  <p>My configureStore looks like bellow, i can't see what i should do differently</p>
  
  <pre><code>export default function configureStore(initialState, history) {
  
    const reactRouterReduxMiddleware = routerMiddleware(history);
  
    let middleware = [
      thunk,
      promiseMiddleware,
      reactRouterReduxMiddleware
    ];
  
    const store = applyMiddleware(...middleware)(createStore)(rootReducer, initialState);
  
    return store;
  }
  </code></pre>
  
  <hr>
  
  <p>Half-answer</p>
  
  <p>The issue turned out to be the promise middleware.</p>
  
  <p>The boilerplate i used to was using a custom middleware, like the one bellow</p>
  
  <pre><code>/*
  * Redux middleware to handle promises
  * As seen in: https://github.com/caljrimmer/isomorphic-redux-app
  * https://github.com/choonkending/react-webpack-node/blob/master/app/api/promiseMiddleware.js
  
  */
  export default function promiseMiddleware() {
    return next =&gt; action =&gt; {
      const { promise, type, ...rest } = action;
  
      if (!promise) return next(action);
  
      const SUCCESS = type + '_SUCCESS';
      const REQUEST = type + '_REQUEST';
      const FAILURE = type + '_FAILURE';
      next({ ...rest, type: REQUEST });
      return promise
        .then(req =&gt; {
          next({ ...rest, req, type: SUCCESS });
          return true;
        })
        .catch(error =&gt; {
          next({ ...rest, error, type: FAILURE });
          return false;
        });
     };
  }
  </code></pre>
  
  <p>In my code, i chose to import an npm package, for no particular reason, i just thought to go with an actively maintained repository.
  <a href="https://www.npmjs.com/package/redux-promise-middleware" rel="nofollow">https://www.npmjs.com/package/redux-promise-middleware</a>.</p>
  
  <p>Once i isolated the problem, i switched to this one, and everything worked fine. <a href="https://www.npmjs.com/package/redux-promise" rel="nofollow">https://www.npmjs.com/package/redux-promise</a>.</p>
  
  <p>@dannyjoile had it right, something was wrong in the configureStore. The actions wouldn't reach the reduces, when i was importing the redux-promise-middleware. I'm not sure why, to be honest i don't quite understand redux middleware yet.</p>
  
  <p>I got everything on github, if anyone wants to have a look. 
  <a href="https://github.com/ap-o/react-redux-material-passport" rel="nofollow">https://github.com/ap-o/react-redux-material-passport</a></p>