Skip to content

DefaultRoute doesn't work with children #677

@0x80

Description

@0x80

I was trying to do this

  <Route name="root" path="/" handler={Master}>
      <Route name="composer" handler={Composer}>
        <DefaultRoute name="browse" path="browse" handler={Browse}>
          <Route name="browse-details" path=":id" handler={BrowseDetails}/>
        </DefaultRoute>
        <Route name="create" handler={Create} />
        <Route name="arrange" handler={Arrange} />
      </Route>
      <Route name="conductor" handler={Conductor} />
      <Route name="performer" handler={Performer} />
      <DefaultRoute name="home" handler={Home}/>
  </Route>

... but a DefaultRoute doesn't seem to work with children. How can I make it so that if you browse to "/composer" you end up at /composer/browse?

I've tried adding <Redirect from="composer" to="browse"/> at the bottom as the last child of root, but that didn't seem to do anything.

Maybe I'm misunderstanding something in the API?

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