-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Closed
Labels
feature-requestUsed to close PRs that haven't gone through/been accepted the Proposal process yetUsed to close PRs that haven't gone through/been accepted the Proposal process yet
Description
What is the new or updated feature that you are suggesting?
Just like we can use useLoaderData hook to get loader data from nearest route context, it can be useful to get id of the nearest route context.
Keep in mind useMatches hook matches for all routes not the nearest route context so that won't be of any help here.
Why should this feature be included?
For me personally I need it because I want to depend upon the auto-generated id to get nesting depth of a specific element and I can't come up with any cleaner way. But it may be useful for other people to have access to id for their own reasons.
Metadata
Metadata
Assignees
Labels
feature-requestUsed to close PRs that haven't gone through/been accepted the Proposal process yetUsed to close PRs that haven't gone through/been accepted the Proposal process yet