Replies: 2 comments
-
Would love to see this addressed! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Me as well! An example is when using Tailwind Catalyst Sidebars, which rely on a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Credit to @afzalsayed96 and their original PR for this proposal: #10183
Being able to check "does the given path match the current location", subject to conditions like "is relative", "is case sensitive" etc, has broad applications. The
NavLink
component contains an implementation of that check, but it's not exposed to users of react-router. Personally I'm not comfortable copy-pasting it into my codebase, because there's enough complexity that it might wind up blocking attempts to upgrade to future react-router releases.It would be great if this logic was exposed as a function or hook in the library. This would also resolve issues like this without adding more complexity to
NavLink
.Beta Was this translation helpful? Give feedback.
All reactions