[vue-query] Using useQuery composable from separate package #8058
Unanswered
SagewLivingstone
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, typically when I use vue-query I bundle my queries into composables so they can be re-used like so:
This works great for keeping a data layer separate from the main component code. Recently I've been trying to go a step further and pull these composables into a shared library so multiple Vue apps can use them, to no avail. Example:
With this example, vue-query doesn't believe it's being instantiated within a
setup()
function, so it throws these errors:Any ideas why useQuery can't grab the setup context in this example?
Beta Was this translation helpful? Give feedback.
All reactions