title: redux dispatch action and reducer with new state
body: <p>I have actions like:</p>
  
  <pre><code>export function login(){
    my_login(function(response){
      if(response.status == "ok"){
          loginSuccess(response)
          }
         })
        }
  
  export function loginSuccess(response){
    return dispatch =&gt; {
    dispatch({ response, type: types.LOGIN });
    console.log("dispatched");
    console.log(getState()); ---&gt; I want the updated state
    router.transitionTo("/some_url");----&gt; after this I want to route it to somewhere
    };
  }
  </code></pre>
  
  <p>When my <code>login</code> action is called it again calls <code>my_login</code> and then I am dispatching my <code>loginSuccess</code> action. </p>
  
  <p>I have a reducer like:</p>
  
  <pre><code>const initialState = [
    {
      fname: null,
      lname: false,
    }
  ]
  
  export default function login(state = initialState, action) {
    switch (action.type) {
      case LOGIN:
      console.log("actions dude")
        console.log(action)
          return 
          [{
            fname: action.fname,
            lname: actin.lname,
          }]
      default:
        return state
    }
  }
  </code></pre>
  
  <p>Here my state is not changing and I am not getting the <code>getState()</code> value in action above.</p>
  
  <p>I dont think my reducer is called and state is updated. </p>
  
  <p>Can anyone sugges me whats wrong in here ?</p>