-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
inherit paths from parent routes #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ya. I think I'm in agreement here. 🐬 |
I've almost got a branch ready |
I just realized it also gives meaning to nested |
uhoh. I'm working in the exact same portion of the code right now. Trying to make it possible for |
- paths that start with `/` are absolute like they used to be - paths that don't start with `/` are now relative (meaning they inherit their parent path) - assumed `path`s from `name`s are relative closes #244
they don't need a name, you redirect/transition/link to the parent. |
There's a small conflict. I'll fix it. |
That's what I thought too, but it feels counterintuitive. |
Thanks for this. Love it. |
With the introduction of
DefaultRoute
andNotFoundRoute
I think we need to start inheriting the parent routes.Both of these new components inherit their parent route in one way or another. As I've been writing the docs and coming up with examples it now feels awkward that normal routes don't get their parent's route. It makes the route config less intuitive than I think it could be.
My proposal is simple and follows HTML precedent:
/
are absolute and work the way they do todaypath
s fromname
s would be relative, duplicates should throw (maybe we would already)A potential route config would look like:
So ... yeah ... If
<Route/>
can't inherit the parent, it makes understanding the relationship thatDefaultRoute
andNotFoundRoute
have with the parent more difficult, its also pretty convenient and what you want most of the time.The text was updated successfully, but these errors were encountered: