title: chaining multiple async dispatch in Redux
body: <p>I am trying to chain multiple actions together in the following fashion:</p>
  
  <p>A. post user data to database</p>
  
  <p>B. use posted data to query Elasticsearch for results</p>
  
  <p>(I do A and B in parallel)</p>
  
  <p>B1. with results from ES, query original database for results from two tables
  B2. navigate to new page and update UI</p>
  
  <p>I am using thunks right now to reason about my code, but I also found this async pattern to be extremely verbose:</p>
  
  <pre><code>export function fetchRecipes(request) {
    return function(dispatch) {
      dispatch(requestRecipes(request))    
      return fetch(url)
        .then(response =&gt; response.json())
        .then(json =&gt; dispatch(receiveRecipes(request, json))
      )
    }
  }
  </code></pre>
  
  <p>this, along with "requestRecipes" and "receiveRecipes" as other action creators seems like quite a bit just to make one async call. (a request, a receive, and a fetch function)</p>
  
  <p>summary: when you're chaining 2-3 async actions whose outputs depend on each other (I need to promisify when possible), is there a more efficient means of doing so without writing 3 functions for each async call?</p>
  
  <p>I figure there had to be a way. I'm pattern matching off of the Redux docs and soon became very overwhelmed with the functions I was creating</p>
  
  <p>thanks a lot for the feedback!</p>