Difference between `router.latestLocation` and `router.parseLocation()`
I noticed both of these are undocumented on RouterType
Intuitively it feels the
router.latestLocation
might be more performant, but before relying on this I'd like to understand the difference.Router type | TanStack Router React Docs
The Router type is used to describe a router instance.
Router properties and methods
2 Replies
passive-yellow•15mo ago
I don't see how those would be similar at all, one gives you a state, the other is a method?
what's the use case you want to implement?
rising-crimsonOP•15mo ago
I have some metric/subscriptions outside of components where I want to get the current location. I understand one is a method and the other one a state.
But it seems both yield the same value (when the method is called), and so I wonder if one is better to use than the other for getting the current location?