title: How to add a setTimeout to a fetch promise that uses redux?
body: <p>After a certain amount of seconds if a fetch promise has not been resolved I want to show a timeout error to the user. </p>
  
  <p>I've seen some good examples of adding a setTimeout to fetch here:
  <a href="https://github.com/github/fetch/issues/175" rel="noreferrer">https://github.com/github/fetch/issues/175</a></p>
  
  <p>But how can I handle timing out a fetch promise that also uses redux? E.g.</p>
  
  <pre><code>export function getData() {
    return (dispatch, getState) =&gt; {
      fetch('blah.com/data')
      .then(response =&gt; response.json())
      .then(json =&gt; dispatch(getDataSuccess(json)))
      .catch(
        error =&gt; {
          console.log(error)
        }
      )
        dispatch({
          type: DATA_FETCH_REQUEST
        })
    }
  }
  </code></pre>
  
  <p>Thanks for reading!</p>