title: Why use redux-thunk?
body: <p>I don't understand the need for something like <code>redux-thunk</code>. From what I understand a <code>thunk</code> is a function which returns a function. The wrapped expressions and the use of middleware appear to me to do more to obfuscate what is happening. Taken from <code>redux-thunk</code>'s sample code</p>
  
  <pre><code>import thunk from 'redux-thunk';
  
  // Note: this API requires redux@&gt;=3.1.0
  const store = createStore(
    rootReducer,
    applyMiddleware(thunk)
  );
  
  
  // Meet thunks.
  // A thunk is a function t hat returns a function.
  // This is a thunk.
  
  function makeASandwichWithSecretSauce(forPerson) {
  
    // Invert control!
    // Return a function that accepts `dispatch` so we can dispatch later.
    // Thunk middleware knows how to turn thunk async actions into actions.
  
    return function (dispatch) {
      return fetchSecretSauce().then(
        sauce =&gt; dispatch(makeASandwich(forPerson, sauce)),
        error =&gt; dispatch(apologize('The Sandwich Shop', forPerson, error))
      );
    };
  }
  
  // Thunk middleware lets me dispatch thunk async actions
  // as if they were actions!
  
  store.dispatch(
    makeASandwichWithSecretSauce('Me')
  );
  </code></pre>
  
  <p>The above code could be written far more concisely and intuitive:</p>
  
  <pre><code>fetchSecretSauce().then(
    sauce =&gt; store.dispatch(makeASandwich('Me', sauce)),
    error =&gt; store.dispatch(apologize('The Sandwich Shop', forPerson, error))
  )
  </code></pre>
  
  <p>My question is what need is <code>redux-thunk</code> fulfilling and how does it improve on existing solutions similar to the example above.</p>