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
I'm unable to understand whats going on here and whether this is a bug. This scenario is quite simple, and was working fine in v5, but not in v6. After hours of debugging Ive narrowed to just this:
Navigating to /dashboard/channels will render <Dashboard /> ✅
Navigating to /dashboard/channels/1 will render <SomePage /> ❌
How can # 2 path match the 2nd route when there is an exact match with "dashboard" in the 1st router. The whole point of /* is to match anything that comes after it, as given in https://reactrouter.com/6.30.1/route/route#splats
When I remove the 2nd route, then # 2 path matches the 1st route.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm unable to understand whats going on here and whether this is a bug. This scenario is quite simple, and was working fine in v5, but not in v6. After hours of debugging Ive narrowed to just this:
Given 2 routes likes this:
/dashboard/channelswill render<Dashboard />✅/dashboard/channels/1will render<SomePage />❌How can # 2 path match the 2nd route when there is an exact match with "dashboard" in the 1st router. The whole point of /* is to match anything that comes after it, as given in https://reactrouter.com/6.30.1/route/route#splats
When I remove the 2nd route, then # 2 path matches the 1st route.
Beta Was this translation helpful? Give feedback.
All reactions