Skip to content
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

Allow routes starting with @ in layout routes #8877

Merged
merged 1 commit into from May 18, 2022

Conversation

theostavrides
Copy link
Contributor

Fixes bug #8699

When a route is nested within a layout route, it wont render routes starting with an '@' symbol:

<Routes>
    <Route element={<Layout />}>
        <Route path=":id" element={<Chat />} />
    </Route>
</Routes>

Note that the router works correctly when the parent is NOT a layout route (i.e. has a path defined), or is at the root level:

    <Router>
      <Routes>
        <Route path=":id" element={'works with /@tom'}/>
        <Route path="nested">
          <Route path=":id" element={'works with /nested/@tom'}/>
        </Route>
      </Routes>
    </Router>

@theostavrides
Copy link
Contributor Author

theostavrides commented May 17, 2022

@chaance Hey I messed up my last PR (#8700) so I made a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants