-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Introduce useNavLink hook #10183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce useNavLink hook #10183
Conversation
🦋 Changeset detectedLatest commit: 3f2e8eb The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Thanks for the feature proposal! We've recently moved to an Open Development Process so would you mind putting this feature request into a new Proposal in the Discussions tab? Thank you! |
|
@afzalsayed96 I just ran into the same issue. We have a directory structure in our app where each "file" is a We probably want a more generic name than Would you like to open a proposal? I can open one if you'd like. Thanks! |
|
Go ahead Tom :+1
…On Fri, Mar 17, 2023 at 7:31 PM Tom Picton ***@***.***> wrote:
@afzalsayed96 <https://github.com/afzalsayed96> I just ran into the same
issue. We have a directory structure in our app where each "file" is a
Link, and we want to open all of the Link's parent directories on page
load if their routes match. This was trivial in v5 with useMatch. There's
enough logic in NavLink now that I'm not really comfortable copy-pasting
it into our source, because I would have no idea how to fix it the next
time react-router API changes are shipped.
We probably want a more generic name than useNavLink because this
definitely has broader applications. Might need help from the Remix team in
coming up with something that's consistent with their terminology.
Would you like to open a proposal? I can open one if you'd like. Thanks!
—
Reply to this email directly, view it on GitHub
<#10183 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLBEOYHZOQXVUU4SVY47GLW4RVCJANCNFSM6AAAAAAVWOEIMU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
link to the discussion proposal: #10224 |
|
@brophdawg11 Any chance you could re-open this PR? An open discussion has been available for a few months with no comments from Remix/RR team. IMHO, this feature seems like a no-brainer. |
👋
I've run into a use-case where I need the
isActivelogic of react-routerNavLinkbut do not want to render aLinkitself. Exporting auseNavLinkhook solves this. Wondering if the maintainers would be interested in adding this as a feature in the library iteself.