Refetching useQuery with skip: true results in a network request but does not update data
anantkamath opened this issue · 0 comments
anantkamath commented
To reproduce
const {refetch, data} = useQuery(myQuery, {skip: true})
refetch().then(refetchResponse => console.log(refetchResponse.data))
What happens?
- A network request is made but
data
remainsundefined
refetchResponse.data
contains the expected response
Thus there is an inconsistency where data
is not updated, but updated data is still available via the promise returned by refetch.
Using v3.1.3