title: React Router v6 Navigate to absolute path from subrouter
body: <p>Suppose we have this situation:</p>
  <pre><code>&lt;Routes&gt;
      &lt;Route path=&quot;/&quot; element={&lt;Master/&gt;}/&gt;
      &lt;Route path=&quot;/login&quot; element={&lt;Auth/&gt;}&gt;
          &lt;Route path=&quot;&quot; element={&lt;AuthInitiate/&gt;}/&gt;
          &lt;Route path=&quot;callback&quot; element={&lt;AuthCallback/&gt;}/&gt;
      &lt;/Route&gt;
  &lt;/Routes&gt;
  </code></pre>
  <p>Suppose we currently are in <code>/login/callback</code>. Inside the <code>AuthCallback</code> component I use:</p>
  <pre><code>const navigate = useNavigate()
  navigate(&quot;/&quot;)
  </code></pre>
  <p>The result is that i get redirected to <code>/login</code>, so I understand that the <code>&quot;/&quot;</code> refers to the relative subroute we are in (that is, <code>/login</code>). This is super useful in a lot of situations, but here I just to redirect with respect to the absolute path, so <code>&quot;/&quot;</code> should mean exactly <code>/</code> and not <code>/login</code>.</p>
  <p>How should I do?</p>
  <p>Be aware I'm referring to the new React Router v6.</p>
  <p>EDIT: I had something else redirecting the route, the code instead works exactly as expected and <code>navigate(&quot;/&quot;)</code> from subroute indeed navigate to root level. There are no issues with navigation from subroutes, sorry.</p>