React query prefetching does not work properly
Hey everyone,
I am prefetching data in React query on server side using getStaticProps. But even after that on frontend react query again fetches data because of which I see stale data for a second and then it updates due to fetching on frontend side. How to prevent this issue?
1 Reply
robust-apricotOP•3y ago
This is the code that I have. You can clearly see data being prefetched getStaticProps revalidated after 40 secs. And on the frontend you can see useInfiniteQuery that causes client side fetching. So I want that prefetched data should not be fetched again.
actually nvm guys when i pushed and built it no longer happens