useQuery fire on each mount
Hi, i'm trying to create a fetch of cities, but everytime i interract with an ellement the fetch is fired again.
Am i forced to put my query in a useeffect ? and so create a useState for Error and isLoading ?
Thank you
4 Replies
exotic-emerald•2y ago
Is your queryClient stable?
deep-jadeOP•2y ago
what do you mean about stable
btw i checked the network in the devtools, and the reques is fetch 1 time, it's just the console.log that fire every mount
exotic-emerald•2y ago
Ok so solved?
deep-jadeOP•2y ago
yup