T
TanStack•13mo ago
afraid-scarlet

How to differentiate between navigation from other page, and a full page refresh?

Is there a way to detect the difference between a page load after navigating from another page, or a page load from a full page refresh? They both have cause: enter, and I haven't found any other mechanism I can use for this either. I intend to use it to control whether to scroll an element into view or not.
2 Replies
afraid-scarlet
afraid-scarlet•13mo ago
hm I am not aware of anything we might be able to add this can you explain your use case in a bit more detail? and do other routers offer this already so we can offer a similar API? you might also implement this yourself by storing the initial location and comparing the current location against that
afraid-scarlet
afraid-scarletOP•12mo ago
That's a good workaround I suppose! Thanks Not that I'm aware of. I haven't had this use case before 🙂

Did you find this page helpful?