title: How to navigate to specific path within action in React with Redux application
body: <p>I am new to React with Redux structure and its concept. In my application, I need to navigate specific path in an action after login. My action code is:  </p>
  
  <pre><code>const login = (resp:Object) =&gt; (dispatch: any) =&gt;{
       // api call
       if(apiCall is success){
       window.location.href = "http://localhost:3000"+localStorage.getItem("pathBeforeLogin");
       }
       else{
         window.location.href = "http://localhost:3000/login";
      }
    });
  }
  </code></pre>
  
  <p>This code is working fine but my senior asked me to do this work without using <code>window.location.href</code>. As We are using the react-router v4, browserHistory.push is also not working.</p>