title: Vuex - right way to return a actions answer to the component
body: <p>I have a code which works perfectly fine but I have a question inside my head! </p>
  
  <blockquote>
    <p>Is that code well written?</p>
  </blockquote>
  
  <p>I am not that good with JavaScript but I start to learning few months ago and I am also studying good practices to keep my code clean and organised!</p>
  
  <p><strong>There is the code</strong></p>
  
  <pre><code>export const getSources = ({ dispatch }, data) =&gt; {
    return Api.getSources(data)
      .then((response) =&gt; {
        dispatch(types.GET_SOURCES, response.data);
        return response;
      })
      .catch((response) =&gt; window.console.log('Could not get Sources List!'));
  };
  </code></pre>
  
  <p>That is a actions from my Vuex and what really bothers me is the double return! That was the only option that I've found to get the response at my component!</p>
  
  <p>Somebody can do it better and tells me how?</p>
  
  <p><strong>The method from my component where calls this action</strong></p>
  
  <pre><code>fetchRecordList() {
    this.getSources().then((response) =&gt; {
      window.console.log(response);
    });
  },
  </code></pre>
  
  <p>Thanks in advance!</p>