Refetch data when the path of a page changes #4198
Unanswered
Juanjo-GEx
asked this question in
Ideas
Replies: 1 comment
-
make the page path part of the query key. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using React Query to handle the status of my requests to a Headless CMS. All the views of my project are generated from the same page by default through dynamic routes. This routes are generated correctly, the problem is that when accessing from one to another through internal links such as menus, as they share the same page, they need to do a refetch to update the data to be painted. The options that React Query gives me, don't solve my problem.
refetchInterval
refetchIntervalInBackground
refetchOnMount
refetchOnReconnect
refetchOnWindowFocus
My question is: Is there a way to do a refetch when the page path changes?
Beta Was this translation helpful? Give feedback.
All reactions