title: React Router 6: new useRoutes() method -> how to define a 'redirect'?
body: <p>Using the new React Router 6, I prefer using the <a href="https://reactrouter.com/docs/en/v6/examples/route-objects#route-objects-example" rel="nofollow noreferrer">Route Objects</a> method (using <code>useRoutes()</code>) over the normal JSX route definitions.</p>
  <p>I want to redirect from '/' to '/login'. The docs do not mention though how to achieve such a redirect. Below are my current routes. What am I missing here?</p>
  <pre><code>const routes = [
    { path: '/', element: &lt;Login /&gt; },
    { path: 'login', element: &lt;Login /&gt; },
    { path: 'test', element: &lt;Test /&gt; },
    { path: 'chat', element: &lt;Chat /&gt; },
    { path: '*', element: &lt;NotFound /&gt; },
  ];
  </code></pre>