title: React: 'Redirect' is not exported from 'react-router-dom'
body: <p>I am getting the following error when running <code>npm run start</code> in the terminal.</p>
  <blockquote>
  <p>Attempted import error: 'Redirect' is not exported from 'react-router-dom'.</p>
  </blockquote>
  <p>I have reinstalled <code>node_modules</code>, <code>react-router-dom</code>, <code>react-router</code>. Also restarted the terminal and my computer, but the issue persists.</p>
  <p><strong>My code:</strong></p>
  <pre><code>import React from 'react';
  import { Switch, Redirect } from 'react-router-dom';
  
  import { RouteWithLayout } from './components';
  import { Minimal as MinimalLayout } from './layouts';
  
  import {
    Login as LoginView,
    Dashboard as DashboardView,
    NotFound as NotFoundView
  } from './views';
  
  const Routes = () =&gt; {
    return (
      &lt;Switch&gt;
        &lt;Redirect
          exact
          from=&quot;/&quot;
          to=&quot;/dashboard&quot;
        /&gt;
        &lt;RouteWithLayout
          component={routeProps =&gt; &lt;LoginView {...routeProps} data={data} /&gt;}
          exact
          layout={MinimalLayout}
          path=&quot;/login&quot;
        /&gt;
        &lt;Redirect to=&quot;/not-found&quot; /&gt;
      &lt;/Switch&gt;
    );
  };
  
  export default Routes;
  </code></pre>
  <p>Here is my <code>package.json</code> imports:</p>
  <pre><code>&quot;react-router&quot;: &quot;^6.0.0-beta.0&quot;,
  &quot;react-router-dom&quot;: &quot;^6.0.0-beta.0&quot;,
  </code></pre>