-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[v6] <NavLink> is matching parts of words #7523
Comments
Add the |
@timdorr Please re-open: adding If you add the Expected behaviour for |
Ah, I see what you mean. Sorry about that. |
Potential cause: |
Hello. I've been wondering for a while, why I had troubles with Switch always matching a route I made out of a french word. About in french is "À propos" so I was using /a-propos for a route: <li><NavLink to="/a-propos">À propos</NavLink></li> Problem is that it always seem to match. <li><NavLink to="/apropos">À propos</NavLink></li> |
Does #7660 fix this as it claims? It would be good to have it released if so. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
@timdorr This needs a fresh label. |
This is still a bug in v6.0.0-beta.1 |
This was fixed in 3b54be1 and will be released today in beta.6 |
Version
v6.0.0-beta.0
Test Case
https://codesandbox.io/s/kind-margulis-9n81x?file=/src/App.js
Steps to reproduce
In the sandbox above, navigate to /hamburger
Expected Behavior
The
<NavLink />
should apply theactiveClassName
on the /hamburger link, but not the /ham link.Actual Behavior
It applies the
activeClassName
to both /ham and /hamburger when we are on /hamburger.This is not what you'd expect, and not what's happening in v5 - see https://codesandbox.io/s/strange-platform-zythu?file=/src/App.js for the v5 behaviour.
The text was updated successfully, but these errors were encountered: