title: history.replace in react-router-dom v6
body: <p>I've previously used <code>react-router-dom v5.2.0</code>. There I used <code>history.replace('/path)</code> to redirect the page to another page. (Hence it will not store in the address history). Now I have to use <code>react-router-dom v6.0.0-beta.0</code>. In version 6, I have to use <code>useNavigate</code> hook instead of <code>useHistory</code> hook. I can use it as below.</p>
  <pre><code>const navigate = useNavigate();
  navigate('/path')
  </code></pre>
  <p>But I don't know how to use it for redirect. (Like <code>history.replace</code>)</p>