Can’t make optimistic update in Tanstack query
I have a problem with optimistic update in Tanstack query. My code is simple todo. When you click on checbox, it has to make optimistic update with rewriting this task with !done and make reload of tasks’ list.
But when i click on checkbox to make it done, there is nothing happens and it returns the same list.
Can’t make optimistic update in Tanstack query
I have a problem with optimistic update in Tanstack query. My code is simple todo. When you click on checbox, it has to make optimistic update with rewriting this task with !done and make reload of tasks’ list.
But when i click on checkbox to make it done, there is nothing happens and it returns the same list.
Can’t make optimistic update in Tanstack query
I have a problem with optimistic update in Tanstack query. My code is simple todo. When you click on checbox, it has to make optimistic update with rewriting this task with !done and make reload of tasks’ list.
But when i click on checkbox to make it done, there is nothing happens and it returns the same list.
Can’t make optimistic update in Tanstack query
I have a problem with optimistic update in Tanstack query. My code is simple todo. When you click on checbox, it has to make optimistic update with rewriting this task with !done and make reload of tasks’ list.
But when i click on checkbox to make it done, there is nothing happens and it returns the same list.
How to handle error so that it stops function execution
It goes to the onError in the mutation, however in the try catch the next response has a status of 200 so it does not execute the catch method. What should I do so that if it goes to onError, it goes to catch.
I am also open to any solution that can correctly return/ end the function
How to handle error so that it stops function execution
It goes to the onError in the mutation, however in the try catch the next response has a status of 200 so it does not execute the catch method. What should I do so that if it goes to onError, it goes to catch.
I am also open to any solution that can correctly return/ end the function
How to handle error so that it stops function execution
It goes to the onError in the mutation, however in the try catch the next response has a status of 200 so it does not execute the catch method. What should I do so that if it goes to onError, it goes to catch.
I am also open to any solution that can correctly return/ end the function
Invalidating infinite query leads to deleted pages from the cache
I have an infinite query setup like so for messages relating to a particular chat:
Persisting error state in react-query until successful refetch
I’m using React Query to fetch a list of users via the useQuery hook. When the fetch fails, I display an error message along with a retry button. When I call refetch, both isError and error are immediately reset to false and null. This results in the error message disappearing momentarily, which I want to avoid.
Persisting error state in react-query until successful refetch
I’m using React Query to fetch a list of users via the useQuery hook. When the fetch fails, I display an error message along with a retry button. When I call refetch, both isError and error are immediately reset to false and null. This results in the error message disappearing momentarily, which I want to avoid.