This repository has been archived by the owner on Jan 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Nested Routes #14
Labels
Comments
I always thought react-router had a nice API for this: // Router Configuration
<Route path="/" component={App}>
<Route path="about" component={About}/>
<Route path="users" component={Users}>
<Route path="/user/:userId" component={User}/>
</Route>
<Route path="*" component={NoMatch}/>
</Route>
// Resulting Component Trees...
// Route: /
<App/>
// Route: /about
<App>
<About />
</App>
// Route: /user/23
<App>
<Users>
<User userId={23} />
</Users>
</App>
// Route: /somerandomurl
<App>
<NoMatch />
</App> I'm not sure, but I think this layout can still be achieved with the current API. However I think there would be more boilerplate involved. |
That would be pretty useful for us in terms of code cleanliness as well, as we currently have something like this.
|
Agreed, this would be a really nice feature. |
Just an update on this, I have a branch with this working, just waiting on #25 to get merged first. |
robframpton
pushed a commit
that referenced
this issue
Dec 6, 2017
robframpton
pushed a commit
that referenced
this issue
Dec 11, 2017
Moved to metal/metal-plugins#12 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It is a common use case where a site structure needs to have nested routing.
Currently, only the top level URL routes can be routed via metal-router. It would be useful to be able to do something along the lines of:
The text was updated successfully, but these errors were encountered: