Skip to content

Commit 4ac7c1a

Browse files
QzCuriousTkDodo
andauthored
docs(useMutation): correct docs for mutate function callbacks (#4601)
* docs(useMutation): correct docs for mutate function callbacks * docs: fix merge conflicts Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
1 parent 81baae3 commit 4ac7c1a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/react/guides/mutations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ useMutation({
182182

183183
[//]: # 'Example5'
184184

185-
You might find that you want to **trigger additional callbacks** beyond the ones defined on `useMutation` when calling `mutate`. This can be used to trigger component-specific side effects. To do that, you can provide any of the same callback options to the `mutate` function after your mutation variable. Supported overrides include: `onSuccess`, `onError` and `onSettled`. Please keep in mind that those additional callbacks won't run if your component unmounts _before_ the mutation finishes.
185+
You might find that you want to **trigger additional callbacks** beyond the ones defined on `useMutation` when calling `mutate`. This can be used to trigger component-specific side effects. To do that, you can provide any of the same callback options to the `mutate` function after your mutation variable. Supported options include: `onSuccess`, `onError` and `onSettled`. Please keep in mind that those additional callbacks won't run if your component unmounts _before_ the mutation finishes.
186186

187187
[//]: # 'Example6'
188188

docs/react/reference/useMutation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ mutate(variables, {
9696
**Returns**
9797

9898
- `mutate: (variables: TVariables, { onSuccess, onSettled, onError }) => void`
99-
- The mutation function you can call with variables to trigger the mutation and optionally override options passed to `useMutation`.
99+
- The mutation function you can call with variables to trigger the mutation and optionally hooks on additional callback options.
100100
- `variables: TVariables`
101101
- Optional
102102
- The variables object to pass to the `mutationFn`.

0 commit comments

Comments
 (0)