preact-router
preact-router copied to clipboard
activeClassName case sensitive?
I'm currently having an issue with the activeClassName
prop on <Link />
.
It doesn't seem to activate if the URL has a different case to the <Link />
href
value.
For example, if the current URL is: www.urlname.com/MyPageName
But the href
value in the <Link />
is:
/mypagename
The active class does not get applied. Is there any way to get around this? Is there some configuration I am missing?
Thank you
Ah, good catch. I think right now preact-router is entirely case-sensitive, but the browser is not.
This is old, but case sensitive paths of urls should be the right behavior. /XYZ is a complete different url than /xyz. They can exist the same time and deliver complete different content. This is only on windows webservers not the case if they deliver files, because the windows file system is case insensitive by default. But professional server operating systems are case sensitive.
Btw. web applications should never deliver content case insensitive and promote different urls for the same content. This is duplicate content.