title: Attempted import error: 'Switch' is not exported from 'react-router-dom'
body: <p>I don't know why I am getting this error and I can't find an answer for it anywhere. I have uninstalled the <code>react-router-dom</code> package and reinstalled it, but it continues to tell me that the switch module is not exported from react-router-dom. Here's my code.</p>
  <p>The error I'm getting:</p>
  <blockquote>
  <p>Attempted import error: 'Switch' is not exported from 'react-router-dom'.</p>
  </blockquote>
  <h3>Code</h3>
  <pre class="lang-js prettyprint-override"><code>import React from 'react';
  import './App.css';
  import NavBar from './components/navbar.js';
  import Footer from './components/footer.js';
  import Home from './components/pages/homepage/home.js';
  import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom';
  
  function App() {
    return (
      &lt;Router&gt;
        &lt;div className=&quot;app-container&quot;&gt;
          &lt;NavBar /&gt;
          &lt;Switch&gt;
            &lt;Route path=&quot;/home&quot; component={Home} /&gt;
          &lt;/Switch&gt;
          &lt;Footer /&gt;
        &lt;/div&gt;
      &lt;/Router&gt;
    );
  }
  
  export default App;
  </code></pre>