In React Router v6 we are able to add ids to our routes, but there is no documentation how I can access the id of the current route. In our case I would like to use it to identify the current active route and render the content of a header dynamically (instead of using useMatch).
<Route path="orders" element={<Orders/>} id="orders" exact/>
Is there any way how I can access it?