Hydrate's purpose is for SSR?
I'm using Next 12, and I saw some examples with and without hydrate. Does its main purpose is to fetch data on the server? Isn't it being done already by using something like getServerSideProps?
It adds so much overhead, so I wonder what's its worth
2 Replies
unwilling-turquoise•4y ago
not sure I get the question. in gSSP, you fetch data, but this only passes it as a prop to the page. without hydration, the data will not wind up in the query cache. You can also use initialData - that's also in the docs
exotic-emeraldOP•4y ago
But i've played with RQ in next 13 for a while, and had no problem using it without hydration. Everytime I used useQuery, the data was saved, and I could see it on the devtools