[Next.js + react-query] prefetchInfiniteQuery does not work in SSR #3120
Replies: 2 comments 4 replies
-
You cannot serialize undefined to json. Not sure how this could've worked before. Have a look here: https://react-query.tanstack.com/reference/hydration#limitations |
Beta Was this translation helpful? Give feedback.
-
Hi! Today I had the same problem with the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have upgraded my project to newest version of Nextjs and react-query and one of the page of my site stopped working. On that page I'm rendering list of items which is paginated.
In
getServerSideProps
I'm callingprefetchInfiniteQuery
to fetch data of paginated list to cache. But during server side rendering, it returns error:I have tried basically everything to suppress this error, but nothing helped. What can be cause of this error?
Thank You for any help.
Beta Was this translation helpful? Give feedback.
All reactions