React Router V6 PERSENTO PERDE
// React Router v6 with lazy loading and <Suspense />
const Home = lazy(() => import('./home'));
const About = lazy(() => import('./about'));
function App() {
return (
<Router>
<Suspense fallback={<p> Loading...</p>}>
<Routes>
<Route path='/' element={<Home />} />
<Route path='/about' element={<About />} />
</Routes>
</Suspense>
</Router>
);
}
KostasX