I am trying to make a simple react-router. But it's not even working. If I don't include the <Routes> tag the page is blank. After including the <Routes> tag it is also not working. Please take a look.
import React from 'react';
import './App.css';
import Nav from './Nav';
import About from './About';
import Shop from './Shop';
import{ BrowserRouter as Router, Switch, Route, Routes }from 'react-router-dom';
function App () {
return (
<Router>
<main>
<Nav/>
<Routes>
<Route path="/about" component={About}/>
</Routes>
<Routes>
<Route path="/shop" component={Shop}/>
</Routes>
</main>
</Router>
);
}
export default App;
Edit: I am using the latest version (6.3.0) of react-router-dom.