-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed
Labels
Description
Splat will not directly catch inside the child route if we use path "*" and element as Parent Component.
If you define dashboard/* directly in Route, React Router expects child routes to be handled inside Dashboard. However, the issue happens when React Router doesn’t recognize the child properly due to missing hierarchy.
<Routes>
<Route path="/" element={<Home />} />
- <Route path="dashboard/*" element={<Dashboard />} />
+ <Route path="dashboard">
+ <Route path="*" element={<Dashboard />} />
+ </Route>
</Routes>