Skip to content

Nested routing example #2

@kettanaito

Description

@kettanaito

Hi! Thank you for building this, the package looks awesome.

It would be great to document nested routing. Is it even supported currently? I'm talking things like:

/dashboard
  /profile
    /settings

How can I describe these nested routes and how would I render them? I suspect nesting outlets should do that, but nothing in the README or examples suggests one can do that.

I'd love to achieve this:

function Dashboard() {
  return (
    <div>
      <p>dashboard</p>
      <outlet />
    </div>
  )
}

function DashboardProfile() {
  return <div><p>profile</p><outlet /></div>
}

function Settings() {
  return <p>settings</p>
}

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