How to get the current path from route.tsx/layout
I'm creating a sidebar and need the path to style isActive on navlink. I want to avoid using useLocation on client to reduce flashing on refresh. I thought Route.path or Route.fullPath would be a good solution, but it outputs 'undefined' and '/' respectively even when I'm on different routes (children). In order to get the actual correct path, I need to go to the page itself and use Route.path, which is not ideal because sidebar is located in route.tsx(layout). Any suggestion on how I should proceed?