Skip to content

Commit b8a0b99

Browse files
authored
docs: Update api.md (TanStack#862)
Added description for a couple of return values missing from the `useMutation` documentation.
1 parent 15f53ca commit b8a0b99

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/src/pages/docs/api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,14 @@ const promise = mutate(variables, {
302302
- `loading` if the mutation is currently executing.
303303
- `error` if the last mutation attempt resulted in an error.
304304
- `success` if the last mutation attempt was successful.
305+
- `isIdle`, `isLoading`, `isSuccess`, `isError`: boolean variables derived from `status`
305306
- `data: undefined | Any`
306307
- Defaults to `undefined`
307308
- The last successfully resolved data for the query.
308309
- `error: null | Error`
309310
- The error object for the query, if an error was encountered.
311+
- `reset: Function() => void`
312+
- A function to clean the mutation internal state (i.e., it resets the mutation to its initial state).
310313
311314
## `queryCache`
312315

0 commit comments

Comments
 (0)