How to stream client components to the browser after data is fetched in server on Initial Render?
Unanswered
aprilia posted this in #help-forum
apriliaOP
We are heavily invested on TanStack query. The problem is we are now required to fetch all the data on the server side only and not on client side. So TITLE.
It would be amazing if I can use the experimental ppr with this
It would be amazing if I can use the experimental ppr with this
3 Replies
apriliaOP
I think i was able to get it work somehow but got the error:
Server Functions cannot be called during initial render. This would create a fetch waterfall. Try to use a Server Component to pass data to Client Components instead.
which is validapriliaOP
I can easily avoid this by using something like an
isMounted
hook, but not sure if thats the right way :(apriliaOP
Ok, I removed all the Suspense shenanigans and it seems to work just fine 🤔