title: In Redux, what is the best way to post data to a server?
body: <p>I want to post data to a server.. my action is like this:</p>
  
  <pre><code>export function addNewTodo(text) {
    return {
      type: 'ADD_NEW_TODO',
      payload: addNewTodoApi(text)
    };
  }
  
  let addNewTodoApi = function(text) {
    return new Promise(function(resolve, reject) {
      //implement fake method for get data from server
      setTimeout(function () {
        resolve({
          text:     text,
          done:     ??,
          assignTo: ??,
          Project:  ??,
          Category: ??,
          id:       ??
        });
      }, 10);
    });
  };
  </code></pre>
  
  <p>I have three way. The first way is import store and and call getState method in my action and the second way is dispatch action in reducer and the last way is pass all data in my action as argument. Which one is correct? I read <a href="https://stackoverflow.com/questions/35667249/accessing-redux-state-in-an-action-creator">this question</a> and I'm worried about antipatterns.</p>