Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Access route param inside deeply nested component #133

Open
norbiu opened this issue Jun 26, 2020 · 0 comments
Open

Access route param inside deeply nested component #133

norbiu opened this issue Jun 26, 2020 · 0 comments

Comments

@norbiu
Copy link

norbiu commented Jun 26, 2020

I have a route for the product page called '/product/:productHash'. I also have a component on that page that is nested a few levels inside the main. Is there a hook that could access that param inside the nested component without passing it all the way down? I tried usePath, but that gives me the whole path.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant