hookrouter icon indicating copy to clipboard operation
hookrouter copied to clipboard

Access route param inside deeply nested component

Open norbiu opened this issue 5 years ago • 0 comments

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.

norbiu avatar Jun 26 '20 11:06 norbiu