We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba86d6f commit 7cf74a4Copy full SHA for 7cf74a4
examples/optimistic-updates/pages/index.js
@@ -52,7 +52,7 @@ function Example() {
52
onError: (err, variables, previousValue) =>
53
queryClient.setQueryData('todos', previousValue),
54
// After success or failure, refetch the todos query
55
- onSuccess: () => {
+ onSettled: () => {
56
queryClient.invalidateQueries('todos')
57
},
58
}
0 commit comments