title: what is the equivalent of this.props.history.push('/some_route') of react class components in hooks?
body: <p>I am trying to accomplish this </p>
  
  <pre><code>import {isAuthorized} from '../somewhere'
  async componentDidMount() {
     const authorized = await isAuthorized()
     if(!authorized){
     this.props.history.push('/login')
    }
  }
  </code></pre>
  
  <p>in react hooks, how can I achive this exact functionality, thanks</p>