Closed
Description
Describe the bug
This bug is solely for the benefit of using react-query
with TypeScript.
When specifying the initialData
option, I don't think the data
prop should be unioned with undefined
. Then whenever you want to use the data
of the returned object, you have to apply the non-null assertion operator (!
) to use it's value.
I assume this also applies to placeholderData
but I've not used it so not 100% here.
To Reproduce
Make a call to the useQuery
hook with specifying either initialData
or placeholderData
.
Expected behavior
When either initialData
or placeholderData
is specified, then data
is not unioned with undefined
.
Metadata
Metadata
Assignees
Labels
No labels