Is there a way to get Route.fullPath using createLazyFileRoute?
Im migrating to the new version, in the old version I just imported Route into my lazy loaded component. but now, I have a route in the route.tsx and a lazyroute in my route.lazy.tsx, do I need to import the route from the route.tsx to get fullPath (as a different name, as there is already a Route variable for the lazyfileroute in route.lazy.tsx)
2 Replies
other-emerald•2y ago
Assuming this is for the page, you could use the useRouterState hook on the page.
metropolitan-bronzeOP•2y ago
sounds good, thanks!
hm, The issue with it is that it gives me the state of the current location of the URL while i need to location of the specific route
<Link
to={location.pathname + '/$postId'}
now when I go to another route, it keeps adding postId's instead of just having the Posts/postid
rn I do an import lik ethis
then I use NotLazyRoute.fullPath