React Router v5 - Get the template of the current route

Viewed 81

I need to get the route template corresponding to the current URL. If I use useRouteMatch hook outside component that corresponding to current route, it returns root route (/). How to get most nested route template from top level components?

0 Answers
Related