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

Rank index routes higher than layouts #8143

Closed
mjackson opened this issue Oct 19, 2021 · 2 comments
Closed

Rank index routes higher than layouts #8143

mjackson opened this issue Oct 19, 2021 · 2 comments
Assignees

Comments

@mjackson
Copy link
Member

mjackson commented Oct 19, 2021

Index routes should rank higher than sibling layout routes with the same path.

let routes = (
  <Routes>
    <Route path="layout" element={...}>
      <Route path="page" element={...} />
    </Route>

    {/* When the URL is /layout, this route should match because it is more specific */}
    <Route path="layout" index element={...} />
  </Routes>
);
@mjackson mjackson self-assigned this Oct 19, 2021
@mjackson
Copy link
Member Author

This depends on #8144

@mjackson
Copy link
Member Author

This was fixed in #8151

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

No branches or pull requests

2 participants