Default sub route react router v6

Viewed 10
<Route path="dashboard" element={<Dashboard />}>
     <Route path="appointments" element={<Appointments />} />
     <Route path="documents" element={<Documents />} />
     <Route
         path="medical-information"
         element={<MedicalInformation />}
     />
     Route path="profile" element={<MyProfile />} />
</Route>

I have part of router setup like above but I don't want /dashboard to exist at all, i want to make dashboard/appointments to be default route for /dashboard

Any ideas how to solve with v6 router? Idea is to avoid redirection.

0 Answers
Related