Active Link with trailing slash #30284
Unanswered
lomby92
asked this question in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As now, the
gatsby-link
module allows to specify a class name when the to URL matches the navigated one.If you create a page, eg: /test, the activeClassName will be used only when you navigate by clicking (mouse, touch, etc). If you refresh the page to this specific URL the class name will be activated as the path is /test/ (note the trailing slash).
Would it be wrong to consider /test and /test/ as exactly matching? Note that /test/something should not match, it will be considered only for partial matching
Beta Was this translation helpful? Give feedback.
All reactions