Install the dependancy
pnpm install react-router-dom
Open you main.tsx and wrap your app in BrowserRouter
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>
);
In your App.tsx create the following
function App() {
return (
<Routes>
<Route path='/' element={<Login />} />
<Route path='/about' element={<About />} />
</Routes>
);
}