quilt icon indicating copy to clipboard operation
quilt copied to clipboard

Add in full support for streaming

Open lemonmade opened this issue 2 years ago • 0 comments

Added stream: 'headers' to the server rendering stuff, but that just early-sends the response with link preload headers for critical assets. Still need to bring in the new streaming renderer from https://github.com/preactjs/preact-render-to-string/pull/267, and allow you to use streaming for the body, too. Will need to decide if/ how that interoperates with the "render in a loop" approach to rendering the app I current do. In any case, need to document the way to enable streaming, the pros to doing so, and the limitations:

  • No useful status codes
  • No using @quilted/quilt/http stuff for mutating the HTTP response (or maybe you can, when streaming the body, before the first suspense?
  • No server-side redirects with <Redirect />
  • If fully streaming the body, can’t define <head> content from the app (@quilted/quilt/html components and hooks)

lemonmade avatar Feb 08 '23 21:02 lemonmade