TanStackT
TanStack2y ago
18 replies
verbal-lime

vue-query query return types are not unwraped in template?

Hello!

New to vue-query so unsure if this is a user error but the return type of

const { data } = useQuery({
  //    ^? const data: Ref<number> | Ref<undefined>


is not being unwraped correcly in the <template>.

vues typescript thinks I need to be calling {{ data.value}} but this is wrong and throws a runtime error, calling {{data}} in template throws a typescript error but run fine. Any ideas here?
image.png
Was this page helpful?