TanStackT
TanStack2y ago
2 replies
nursing-lime

setQueryData with marked data to no refetch data in specific time

- I have the same endpoint using by useMutation and useQuery
- first app start I call useMutation and there is any data I would navigate to the screen then in the screen also have useQuery using the same endpoint as useMutation
- I want to use setQueryData in useMutation onSuccess with marked query to not refetch when I navigate to the screen that using useQuery
- is is possble to call setQueryData and marked the query as refetched ?
- WHY I using like this ? -> I migrate from redux to useQuery but some how I want to save requesting to my
Was this page helpful?