Abstract NavLink logic into a reusable useNavLink
hook
#11408
Closed
willhoney7
started this conversation in
Proposals
Replies: 1 comment
-
Ah, realized this is a duplicate of #10224 |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I find myself replicating the NavLink
isActive
,isPending
logic in various places in my codebase. Sometimes I want to indicate a pending navigation, or whether a path is active without actually rendering a link. It would be great if the NavLink logic was abstracted into an exporteduseNavLink
hook that consumers could use.I think this is a pretty simple change. In fact, the PR to do this exact thing was created last year. Can we merge that PR? #10183
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions