Best practice to separate fetching logic from component?
I want to call 1 of 2 possbile useQuery hooks each time a page loads. However I get ' vue-query hooks can only be used inside setup() function' when I attempt this with reactive variables and a watch. What is the best way to keep the following separate from my main page component: the useQuery hooks, logic that is required before the useQuery hooks to determine what values get passed to them, and data processing I do after fetching?
0 Replies