You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The index route should render. The layout shouldn't match.
Actual Behavior
The layout route renders!
At first I was thinking index routes just need to rank higher, but realized that a layout route, without any matching children, shouldn't even be matching in the first place.
<Layout/> shouldn't match "/", it should only match "/privacy".
What version of React Router are you using?
v6
Steps to Reproduce
Visit "/"
Expected Behavior
The index route should render. The layout shouldn't match.
Actual Behavior
The layout route renders!
At first I was thinking index routes just need to rank higher, but realized that a layout route, without any matching children, shouldn't even be matching in the first place.
<Layout/>
shouldn't match "/", it should only match "/privacy".If you reorder the routes it works:
But v6 is smarter than that.
A good test case might not involve index routes at all and just assert the layout route doesn't match if its child routes don't match.
The text was updated successfully, but these errors were encountered: