Navigation
Hello! New here. What would be a common cause of a useQuery fetching data when the page is refreshed, but then not when I navigate forward or back to the page? Is there something extra needed to get it to do that?
2 Replies
xenial-black•3y ago
Depends on a couple of factors. Does navigation mount a different component or just re-render? Do you have staleTime set?
eastern-cyanOP•3y ago
Oh my, TkDodo--I'm very grateful for help from one of the maintainers of the library! As for your questions:
1. I'm pretty sure it's mounting.
2. I do have a staleTime set.
... and when I remove the latter it fetches. Yay!
Thanks so much for helping a newbie. I feel like sneaking in all my questions here 🙂