quilt
quilt copied to clipboard
Add in full support for streaming
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/httpstuff 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/htmlcomponents and hooks)