executing enabled false query
this still execute and shows 'log' in terminal. Using it with a useSuspense() call
5 Replies
fair-roseOP•16mo ago
okey just realized its because suspenseQuery. Is there any way to make those queries conditional?
eastern-cyan•16mo ago
No
stormy-gold•16mo ago
What do you need that for? Note that you don't need enabled for dependent queries when using suspense
fair-roseOP•16mo ago
i have a route with an optional param [...id]] and depending if thats coming I want to prefetch & execute the suspenseQuery.
I guess its fine if I just move to use useQuery, but what its an unexpected behaviour is to set enabled: false and get the console.log executed anyhow
stormy-gold•16mo ago
render the component that does the query conditionally or switch to useQuery