Replies: 1 comment
-
you can not |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Expected:
Previously in Pages Router, it was achieved using
getInitialProps
, like so:In App Router, based on the docs, this is the only way to query data on the server:
https://tanstack.com/query/latest/docs/framework/react/guides/advanced-ssr
With this setup it will hit the server and wait for data fetching all the time, which is a slow navigation experience. How to detect whether it's the first load? Or return cached data instantly?
Beta Was this translation helpful? Give feedback.
All reactions