title: What to use instead browserHistory for react router v4 to REDIRECT after Sign In/Sign In(firebase)
body: <p>I'm using firebase for sign in/sign up with React Router v4.
  What can I use instead browserHistory in order to redirect user after Sign In/Up to other component?</p>
  
  <p>So what to use instead </p>
  
  <p><code>browserHistory.push('/app');</code> . I tried with <code>&lt;Redirect push to="/app" /&gt;</code></p>
  
  <p>and instead <code>browserHistory.replace('/signin');</code> I tried<code>&lt;Redirect replace to="/signin" /&gt;</code>
  but it doesn't work.</p>
  
  <p>Here is part of the code:
  imports and onAuthStateChanged() function</p>
  
  <pre><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import { Switch, Redirect, Route} from 'react-router';
  import { BrowserRouter, Link } from 'react-router-dom';
  import { firebaseApp } from './firebase';
  
  firebaseApp.auth().onAuthStateChanged(user =&gt; {
    if(user) {
      console.log('user has singed in or up', user);
  
      //**** WHAT TO USE INSTEAD OF THIS?*******
      // browserHistory.push('/app');
  
   }
    else {
      console.log('user has signed out or still needs to sign in');
  
       //**** WHAT TO USE INSTEAD OF THIS?*******
      // browserHistory.replace('/signin');
   }
  })
  </code></pre>