title: Why do you need 'Actions' as data in redux?
body: <p><a href="http://rackt.org/redux/docs/basics/Actions.html">Redux documentations</a> says I should make actions and action creators, like this:</p>
  
  <pre><code>function addTodo(filter) {
    return { 
      type: SET_VISIBILITY_FILTER, 
      filter
    }
  }
  </code></pre>
  
  <p>Then write reducers, like this: </p>
  
  <pre><code>function todoApp(state = initialState, action) {
    switch (action.type) {
     case SET_VISIBILITY_FILTER:
       return Object.assign({}, state, {
         visibilityFilter: action.filter
       });
    } 
  }
  </code></pre>
  
  <p>I then invoke the action using dispatch:</p>
  
  <pre><code>store.dispatch(addTodo("Ask question on stackoverflow"));
  </code></pre>
  
  <p>It seems there's a one-one correspondence between actions and reducers; the sole purpose of the action is to select a reducer and provide input data for that reducer. </p>
  
  <p>Why don't we skip the middle man and identify actions with reducers and action creators with functions producing reducers? Then <code>dispatch</code> would take a single argument, a reducer/action of type <code>State =&gt; State</code>:</p>
  
  <pre><code>// Action/reducer. (Parametrised state transformer, really.)
  const addTodo = text =&gt; state =&gt; {
    return Object.assign({}, state, {
         visibilityFilter: action.filter
    });
  }
  
  // Dispatch takes as a argument the action/reducer
  store.dispatch(addTodo("Ask question on stackoverflow"));
  </code></pre>
  
  <p>You'd lose the ability to serialise actions, but otherwise, it seems you'd get rid of boilerplate action creators and express more clearly the connection between actions and reducers. If you're in Typescript, you also get typechecking of the data in actions, which is <a href="https://stackoverflow.com/questions/21034017/how-do-you-emulate-adts-and-pattern-matching-in-typescript">difficult to express otherwise</a>.</p>
  
  <p>So what reasons for having actions as data am I missing?</p>