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
Create a data router with one route configured with this path: /contact/:id
In that route's element, render a relative="path" NavLink: <NavLink relative="path" to="../1" className={({ isActive }) => isActive ? "active" : undefined} >Michael</NavLink>
In your browser, go to the following URL: /contact/1
Expected Behavior
The generated DOM element should contain the active class: <a href="/contact/1" class="active">Michael</a>
Actual Behavior
The generated DOM element has the right href but doesn't contain the active class: <a href="/contact/1">Michael</a>, so the expected styles aren't applied.
The text was updated successfully, but these errors were encountered:
What version of React Router are you using?
6.4.2
Steps to Reproduce
/contact/:id
<NavLink relative="path" to="../1" className={({ isActive }) => isActive ? "active" : undefined} >Michael</NavLink>
/contact/1
Expected Behavior
The generated DOM element should contain the active class:
<a href="/contact/1" class="active">Michael</a>
Actual Behavior
The generated DOM element has the right
href
but doesn't contain the active class:<a href="/contact/1">Michael</a>
, so the expected styles aren't applied.The text was updated successfully, but these errors were encountered: