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
The active link for NavLinks are not created for paths that have parentheses. It seems that the underlying regex that is generated by path-to-regex does not escape the parentheses in the generated regex and instead interprets it as a match group. Notice in the example how the active classname is not set for the about component.
The active link for NavLinks are not created for paths that have parentheses. It seems that the underlying regex that is generated by path-to-regex does not escape the parentheses in the generated regex and instead interprets it as a match group. Notice in the example how the active classname is not set for the about component.
Version
4.1.1
Test Case
https://codesandbox.io/s/n55VljYk7
Steps to reproduce
Create a NavLink component whose path has parentheses, ie
/some/path (1)
.Expected Behavior
When the component is routed to and rendering the active classname should be added.
Actual Behavior
The classname is missing.
I wasn't sure if this was expected behavior in the underlying path-to-regex, so I figured it'd be best to ask here first.
The text was updated successfully, but these errors were encountered: