title: How to provide a Redux POST Action
body: <p>Is the code below the right approach to provide POST requests in the redux application design?</p>
  
  <p>The code woks fine but I'm not sure if it is again the architecture for any reason.</p>
  
  <pre><code>export const SITES_RECEIVED = 'SITES_RECEIVED';
  
  //@private
  function sitesReceived(sites) {
    return {
      type: SITES_RECEIVED,
      sites: sites
    };
  }
  
  //@public
  export const sitesFetch = () =&gt; {
    return dispatch =&gt; {
  
      fetch('http://localhost:3000/')
        .then(function(response) {
          return response.text();
        }).then(function(body) {
          return JSON.parse(body);
        }).then(function(json) {
          dispatch(sitesReceived(json));
        })
    };
  }
  </code></pre>
  
  <p><em>Requirements: redux, redux-thunk</em></p>