I was following the quick start guide on react-router, and I came across this code sample that shows how to direct a route to a nested route by default using index.
Now my question is if the path you're trying to switch to requires a parameter :someID how would I set it as the index with a default value? e.g /23
function App() {
return (
<Routes>
<Route path="/" element={<Layout />}>
<Route index element={<Activity />} />
<Route path="invoices" element={<Invoices />} />
<Route path="activity" element={<Activity />} />
<Route path=":someID" element={<SomePath />} />
</Route>
</Routes>
);
}