query
query copied to clipboard
Docs: useMutation's returned `data` property description
Describe the bug
I am reading the docs for useMutation
and one of the returned properties is data
.
useMutation docs
This is the description:
-
data: undefined | unknown
- Defaults to
undefined
- The last successfully resolved data for the query.
- Defaults to
The last part mentions a query - what query would that be?
If it's a typo, what does the data
property actually contain?
Your minimal, reproducible example
https://tanstack.com/query/latest/docs/framework/react/reference/useMutation#:~:text=data%3A%20undefined%20%7C%20unknown
Steps to reproduce
Read the docs for data
returned by useMutation
Expected behavior
Better description of what the property means
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
--
Tanstack Query adapter
None
TanStack Query version
v.5
TypeScript version
No response
Additional context
No response
I tried it and the data
property basically contains the resolved value that mutationFn
returns.
So would the correct phrasing be "The last successfully resolved data from the mutationFn
"?
it's a typo.The last successfully resolved data for the mutation
. Please make a PR to the docs.