-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Description
What is the new or updated feature that you are suggesting?
Great to see that absolute paths will be supported in V6, I find it very handy to work with.
For it to be fully supported I believe it should work when using nested <Routes>
as well.
const App = () => (
<Routes>
<Route path="/users/*" element={<Users />} />
</Routes>
);
const Users = () => (
<Routes>
<Route path="/users/:id/settings" element={<UserSettings />} />
</Routes>
);
Currently (v6.0.0-beta.4) the route definition in the nested <Routes>
will match on a relative route, even though they start with /
indicating an absolute route.
Why should this feature be included?
This way we can use absolute paths throughout our application when we don't specify all routes in the same <Routes>
component. This will also make the migration from v5 to v6 much easier as this pattern is supported there using <Switch>
.
Lure5134, thedanwoods, Newbie012, hudecsamuel, openscript and 66 morexseman, tahara-san, mkrause, pkerschbaum, ChronoLoop and 7 more
Metadata
Metadata
Assignees
Labels
No labels