Closed sgup closed 1 month ago
It would work if your browser were a search engine, because in that case, Next.js renders the whole page on the server and flushes it when it is finished - but in the case of normal browsers, Next.js uses React's "out of order" streaming and that requires JS to be enabled.
Your page will still load with the .js
files 100% blocked, but there is a little bit of inline JS required to "stitch it together" correctly, because it it streaming over parts of the page as they finish rendering on the server, not in the order they actually appear in the DOM.
It would work if your browser were a search engine, because in that case, Next.js renders the whole page on the server and flushes it when it is finished - but in the case of normal browsers, Next.js uses React's "out of order" streaming and that requires JS to be enabled.
Ok, good to know! Search engines/SEO is my main concern, so it seems like the next/vercel magic will do that with this lib. Thanks for all your expertise and great work on this library!
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.
Hi,
I'm using Nextjs with the App router, and have followed the instructions for incorporating the SSR method from this library. I'm also using it with the
useSuspenseQuery
hook. Is it possible to have the page render right away, even with JS disabled? As soon as I introduce this hook, all I see is theloading.ts
content, even on reloads where it seems to have cached the content server-side.In my testing it works perfect fine when using the RSC method and passing in the data, so the client components can render fine on the server. Id just like to be able to use SSR/useSuspenseQuery to have proper hydration/client-side
cache-and-network
to have the latest data.Here's my code: