Unable to render my components inside the <Route> in App.js
import React from 'react'; import { Routes, Route } from 'react-router-dom'; import Navs from './components/Navs'; import Home from './pages/Home'; import Starred from './pages/Starred'; function App() { return ( <div> <Navs /> <Routes> <Route exact path="/"> <Home /> </Route> <Route exact path="/starred"> <Starred /> </Route> <Route> <div>Not Found</div> </Route> </Routes> </div> ); } export default App; As per the update, the <Switch> has been changed to <Routes> but the issue is, the data inside the <Route> is not being rendered on the webpage. Can someone point out the cause/error regarding this? A Sololearner suggested to Try this : <Route exact path="/" element={<Home />} /> https://github.com/Roland-Foucher/atelier-cuir-fuchats-front/blob/main/src/components/App.js But this didn't work either.