Replies: 1 comment 1 reply
-
not sure what you're talking about tbh. please show a codesandbox reproduction |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have prefetching setup with getServerSideProps in Next.js.
When I'm on the SSR page (Page 1) my useQuery hook returns the data.
When I navigate to a new page (Page 2), the useQuery data on Page 1 changes to undefined and shows the error on page 2.
Page 1 error is
TypeError: Cannot read properties of undefined (reading '0')
- the data array is no longer available when during page change. The data fetched changes toinvalid
when I click on the other Page 2 link.Any idea how I can fix this?
It seems like this happens only when I navigate from SSR page to non-SSR page.
It doesn't happen navigating to other pages with the same route.
/page/${id}
Beta Was this translation helpful? Give feedback.
All reactions