title: Understanding async dispatch actions using redux thunk
body: <p>I was just going though the files that dispatches ACTIONS in a reactjs app and basically came across the following function::-</p>
  
  <pre><code>// When app inits
  export const init = () =&gt; async dispatch =&gt; {
    dispatch({ type: TYPES.SET_LOADING });
    await dispatch(getConfig());
    await dispatch(getGenres());
    dispatch({ type: TYPES.REMOVE_LOADING });
  };
  </code></pre>
  
  <p>I am a bit confused as to what the async is doing ahead of the dispatch , i am used to seeing normal vanilla javascript async functions like so:</p>
  
  <pre><code>anasyncfunc = async () =&gt; { 
     // write you're code here
  }
  </code></pre>
  
  <p>But the above code confuses me a little. Can somebody please explain this to me.</p>