title: How to add multiple middleware to Redux?
body: <p>I have one piece of middleware already plugged in, <strong>redux-thunk</strong>, and I'd like to add another, <strong>redux-logger</strong>.</p>
  
  <p>How do I configure it so my app uses both pieces of middleware? I tried passing in an array of <code>[ReduxThunk, logger]</code> but that didn't work.</p>
  
  <p>Code:</p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import { Provider } from 'react-redux';
  import { createStore, applyMiddleware } from 'redux';
  import ReduxThunk from 'redux-thunk';
  import logger from 'redux-logger';
  
  import App from './components/app';
  import reducers from './reducers';
  require('./style.scss');
  
  const createStoreWithMiddleware = applyMiddleware(ReduxThunk)(createStore);
  
  ReactDOM.render(
    &lt;Provider store={createStoreWithMiddleware(reducers)}&gt;
      &lt;App /&gt;
    &lt;/Provider&gt;,
    document.querySelector('#app')
  );
  </code></pre>