How to use react-intersection-observer with useQuery?
I don't want to fire
But this gets execute whenever the component is re-mounted and the container is in view. Which is obvious because the
I don't want these
Any suggestions please. Thanks.
useQuery until the container is in view. Here is the code I have written:But this gets execute whenever the component is re-mounted and the container is in view. Which is obvious because the
inView changes from false to true, which in result override the staleTime and cacheTime configurations.I don't want these
axios calls to hit if they have data in cache?Any suggestions please. Thanks.