Skip to content

Streaming SSR #103

Closed Answered by cyco130
tigawanna asked this question in Q&A
Discussion options

You must be logged in to vote

It's automatically taken care of.

Rakkas wraps your entire app in Suspense (with an empty fallback) but you can add further Suspense boundaries for more granular loading state. React will then render the fallback and replace it with the actual content once it's ready.

Note that streaming is disabled under certain circumstances:

  • When the request is from a bot (for SEO purposes)
  • When prerendering statically
  • On Vercel and Netlify serverless environments (AWS which they're based on doesn't support streaming responses)
  • When turned off by you (by setting throttleRenderStream to true in a headers function) e.g. if you want to use a lib that doesn't support streaming like Styled Components.

If …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by tigawanna
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants