I didn’t know that when a component is not being rendered by your router, it still can use the router properties history, match and location when you wrap it in the withRouter HOC:
import { withRouter } from 'react-router-dom' ... this.props.history.push('/some-route') ... export default withRouter(ThisComponent)