Skip to content

Nested Routes #12

@jbalsas

Description

@jbalsas

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:

<Router component={SomeComponent} path={some/path/:param1} />

...

class SomeComponent extends JSXComponent {
    render() {
        return {
            <div class="wrapper">
                <HeaderComponent />

                <Router component={FooComponent} path={some/path/:param1/view1} />

                <Router component={BarComponent} path={some/path/:param1/view2} />
            </div>
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions