You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/pages/reference/useMutation.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ const {
23
23
onSettled,
24
24
onSuccess,
25
25
useErrorBoundary,
26
+
meta,
26
27
})
27
28
28
29
mutate(variables, {
@@ -71,6 +72,9 @@ mutate(variables, {
71
72
- Set this to `true` if you want mutation errors to be thrown in the render phase and propagate to the nearest error boundary
72
73
- Set this to `false` to disable the behavior of throwing errors to the error boundary.
73
74
- If set to a function, it will be passed the error and should return a boolean indicating whether to show the error in an error boundary (`true`) or return the error as state (`false`)
75
+
-`meta: Record<string, unknown>`
76
+
- Optional
77
+
- If set, stores additional information on the mutation cache entry that can be used as needed. It will be accessible wherever the `mutation` is available (eg. `onError`, `onSuccess` functions of the `MutationCache`).
0 commit comments