-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Labels
awaiting releaseThis issue has been fixed and will be released soonThis issue has been fixed and will be released soonbug
Description
What version of React Router are you using?
6.6.2, also tried 6.7.0-pre.4
Steps to Reproduce
Consider the following routes:
<Routes>
<Route path="/foo?" element={<Foo />}>
<Route path="/foo?/bar" element={<Bar />} />
</Route>
</Routes>
Expected Behavior
<Bar />
is rendered at either /foo/bar
or /bar
.
Actual Behavior
This fails with the following error: Absolute route path \"/bar\" nested under path \"/foo\" is not valid. An absolute child route path must start with the combined path of all its parent routes.
It looks like the only way to make it work is to switch to relative child route path ("bar"
).
Context: I build path patterns programmatically, in which case it's easier to use absolute patterns whenever possible.
Maddumage, ivp-dev, titenis, fredgig and samuelhuebner
Metadata
Metadata
Assignees
Labels
awaiting releaseThis issue has been fixed and will be released soonThis issue has been fixed and will be released soonbug