title: cannot apply multiple middlewares using Redux applyMiddleware function
body: <p>Can anyone help me out with the right <code>redux store</code> configuration?</p>
  
  <p>I am trying to configure as follows,</p>
  
  <p><strong>configureStore.js</strong></p>
  
  <pre><code>import thunk from 'redux-thunk';
  import logger from 'redux-logger';
  import { createStore, applyMiddleware } from 'redux';
  import rootReducer from '../reducers';
  
  let middlewares = [thunk, logger]
  
  const configureStore = () =&gt; {
    const store = createStore(
      rootReducer,
      applyMiddleware(...middlewares)  // I also tried with applyMiddleware(thunk, logger)
    );
  
    return store;
  }
  
  export default configureStore;
  </code></pre>
  
  <p>And I import this module main js file and use as follows,</p>
  
  <p><strong>index.js</strong></p>
  
  <pre><code>import configureStore from '../stores/configureStore';
  
  const store = configureStore();
  
  // And other DOM render code follows...
  </code></pre>
  
  <p>But is seems not working and the following error displays in the web console,</p>
  
  <p>Error: Uncaught TypeError: <strong>WEBPACK_IMPORTED_MODULE_0__compose</strong>.a.apply(...) is not a function</p>
  
  <p><a href="https://i.stack.imgur.com/MMHwP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MMHwP.png" alt="Error"></a></p>
  
  <p>File in which the error is:
  <a href="https://i.stack.imgur.com/kCnoV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kCnoV.png" alt="enter image description here"></a></p>
  
  <p>I am following official docs of <code>redux</code>, <code>redux-thunk</code> and <code>redux-logger</code> but unable to make it work. </p>
  
  <p>Another note: It works fine when I remove any one of <code>thunk</code> and <code>logger</code> from the middlewares list.</p>
  
  <blockquote>
    <p><strong>UPDATE:</strong>  I got temporary fix</p>
  </blockquote>
  
  <p>Downgrading <code>redux</code> from <code>3.7.2</code> to <code>3.5.2</code> works fine.</p>
  
  <p>I still wonder why it is the problem with latest version of <code>Redux</code>. I tried to add more information related to the issue and looking for solution for future upgrades.</p>
  
  <p>Thanks! </p>