title: react-router-dom V6.2.x Redirect to "/" if page is refreshed manually
body: <p>I realize that with <code>react-router-dom v6.x.x</code> we no longer have the <code>&lt;Redirect /&gt;</code> component as it was replaced with <code>&lt;Navigate /&gt;</code>.</p>
  <p>I have something like this for my routes:
  <code>react-router-dom &quot;^5.3.0&quot;</code></p>
  <pre><code>  const defaultRender = () =&gt; {
      return &lt;Redirect to=&quot;/&quot;/&gt;;
    };
  
    const renderRootPath = () =&gt; (
      &lt;&gt;
        &lt;Route path=&quot;/&quot; render={defaultRender} /&gt;
        &lt;Route
          exact
          path=&quot;/&quot;
          component={Request}
        /&gt;
        &lt;Route
          exact
          path=&quot;/dashboard&quot;
          component={Dashboard}
        /&gt;
      &lt;/&gt;
    );
  
    return (
      &lt;Router basename=&quot;/&quot;&gt;
         &lt;Route path=&quot;/&quot; render={renderRootPath} /&gt;
      &lt;/Router&gt;
    );
  }
  
  </code></pre>
  <p>If I'm on <code>/dashboard</code> route and manually refresh the page, then I'm redirected to <code>/</code> route which is what I would expect.</p>
  <p>I'm upgrading to the latest version and want to have the same behavior. This is my current implementation, but when I refresh the page it never gets redirected to <code>/</code>.
  Any suggestions?</p>
  <p><code>react-router-dom &quot;^6.2.1&quot;</code></p>
  <pre><code>  return (
          &lt;Routes&gt;
            &lt;Route
              exact
              path=&quot;/&quot;
              element={&lt;Navigate replace to=&quot;/&quot; /&gt;} // &lt;&lt;&lt; does not work
            /&gt;
            &lt;Route
              exact
              element={&lt;Request /&gt;}
            /&gt;
            &lt;Route
              exact
              path=&quot;dashboard&quot;
              element={&lt;Dashboard /&gt;}
            /&gt;
          &lt;/Routes&gt;
    );
  </code></pre>
  <p>I have tried the suggested solution <a href="https://stackoverflow.com/questions/69961684/what-is-the-alternative-for-redirect-in-react-router-dom-v-6-0-0">here</a> without success:</p>
  <pre><code>&lt;Routes&gt;
    &lt;Route path=&quot;/&quot; element={&lt;Navigate replace to=&quot;/&quot; /&gt;} /&gt;
    &lt;Route exact path=&quot;/&quot; element={&lt;Request /&gt;} /&gt;
    &lt;Route exact path=&quot;dashboard&quot; element={&lt;Dashboard /&gt;} /&gt;
  &lt;/Routes&gt;
  </code></pre>
  <p>If I'm on the <code>/dashboard</code> page and manually refresh the page, it should then redirect me to <code>/</code>, but it stays within <code>/dashboard</code>.</p>