title: A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>
body: <p>I installed the most recent version of react-router-dom. Then downgraded version to @4.3.1. I still get the error that I should wrap Route in a Routes. As I know, this happens only to more recent versions. I checked the package.json file, I am sure that my version is @4.3.1.</p>
  <pre><code>import React, { Component } from &quot;react&quot;;
  import { Route } from &quot;react-router-dom&quot;;
  import NavBar from &quot;./components/navbar&quot;;
  import Products from &quot;./components/products&quot;;
  import Posts from &quot;./components/posts&quot;;
  import Home from &quot;./components/home&quot;;
  import Dashboard from &quot;./components/admin/dashboard&quot;;
  import ProductDetails from &quot;./components/productDetails&quot;;
  import NotFound from &quot;./components/notFound&quot;;
  import &quot;./App.css&quot;;
  
  class App extends Component {
    render() {
      return (
        &lt;div&gt;
          &lt;NavBar /&gt;
          &lt;div className=&quot;content&quot;&gt;
            &lt;Route path=&quot;/products&quot; component={Products} /&gt;
            &lt;Route path=&quot;/posts&quot; component={Posts} /&gt;
            &lt;Route path=&quot;/admin&quot; component={Dashboard} /&gt;
            &lt;Route path=&quot;/&quot; component={Home} /&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default App;
  </code></pre>