title: is history.push() an async call in react?
body: <p>I am using history object(passed from component to reducer) provided by react in my reducer to conditionally route to other pages while updating the state.
  I knew thats not how navigation must be handled.
  But its still working, Is the history.push() function async call as i am 
  executing it before returning modified state in reducer.
  Can someone explain me why this works</p>
  
  <pre><code>const reducer = (state = initialState, action) =&gt; {
  var stateClone = {...state};
  switch(action.type)
  {
    case 'LogIn':
    var user = state.users.filter((user) =&gt; user.userName === action.userName &amp;&amp; user.password === action.password );
    if(user.length &gt; 0 )
    {
      var loggedInUser = {...user[0]};
      stateClone.loggedInUser = loggedInUser;
      action.history.push('/products');
      return stateClone;
    }
    else {
      alert('Wrong Credentials');
    }
    return state;
  }
  }
  </code></pre>