Skip to content

Config based routing not work with nested routes #255

@Farnsi

Description

@Farnsi

Describe the bug

Full explanation: #254

This works:

page.tsx

// ...
    <Router>
      <Routes>
        <Route path="/" component={Root} />
        <Route path="/page/*" component={Page}></Route>
      </Routes>
    </Router>

page.tsx

// ...
    </>
      <A href="content">link to content</A>
      <Routes>
        <Route path="/content" component={Content} />
      </Routes>
    </>

Transform that code to config based routing and click the link to content change the url, but did not show the component Content.

Your Example Website or App

JSX-bases (ok): https://playcode.io/1335544

Config based (not work): https://playcode.io/1335586

Steps to Reproduce the Bug or Issue

View example.

Expected behavior

Same as tsx-based routing.

Screenshots or Videos

No response

Platform

  • @solidjs/router: 0.8.1
  • Linux Mint 21
  • Chrome Version 111.0.5563.110 (Offizieller Build) (64-Bit)

Additional context

No response

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