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

Warning for leaf routes w/ no element #8145

Closed
mjackson opened this issue Oct 19, 2021 · 1 comment
Closed

Warning for leaf routes w/ no element #8145

mjackson opened this issue Oct 19, 2021 · 1 comment

Comments

@mjackson
Copy link
Member

We should warn when the leaf route has no element prop. In this case, the element would default to an <Outlet> that renders null, which can be confusing.

let routes = (
  <Routes>
    {/* When the URL is /layout, this route will match but won't render anything! */}
    <Route path="layout">
      <Route path="page" element={...} />
    </Route>
  </Routes>
);
@mjackson
Copy link
Member Author

Fixed in #8150

brophdawg11 added a commit that referenced this issue Mar 27, 2024
…om basename (#8145)

Co-authored-by: Mark Dalgleish <mark.john.dalgleish@gmail.com>
Co-authored-by: Matt Brophy <matt@brophy.org>
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

1 participant