useQuery refetch
Hello everyone, I have a react native with typescript using zustand and react-query latest version.
I have a question that I have zustand store to keep my filters object, if it changes, I want to make the
Here's the code:
zustand store:
Get plans with filters component
useGetPlans function
I can think of a solution which is to call refetch() function, or invalidate the query when the filters object changes. But not sure if which one is the better one or a correct way of doing it
Thank you for your help
I have a question that I have zustand store to keep my filters object, if it changes, I want to make the
useQuery to get the latest data with the filters. Here's the code:
zustand store:
Get plans with filters component
useGetPlans function
I can think of a solution which is to call refetch() function, or invalidate the query when the filters object changes. But not sure if which one is the better one or a correct way of doing it
Thank you for your help