-
Notifications
You must be signed in to change notification settings - Fork 11
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
Nested Routes #12
Comments
Copied from deprecate/metal-router#14 (comment) by @mthadley 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. |
Copied from deprecate/metal-router#14 (comment) (comment) by @bawachhe That would be pretty useful for us in terms of code cleanliness as well, as we currently have something like this.
|
Copied from deprecate/metal-router#14 by @AngeloYoun
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: