wcc
wcc copied to clipboard
Streaming HTML
Type of Change
- New Feature Request
Summary
Would like to explore how to provide a streaming API that could also break apart the page at render roots.
So for example a page like this could come out in multiple flushes
<body>
<my-header></my-header>
<my-app></my-app>
<my-footer></my-footer>
</body>
Would flush across those component definitions / boundaries / islands.
Details
To go even further, maybe we could recursively stream nested roots? Like in this example

Links / References
- https://tech.ebayinc.com/engineering/async-fragments-rediscovering-progressive-html-rendering-with-marko/
- https://blog.codinghorror.com/the-lost-art-of-progressive-html-rendering/
- https://www.facebook.com/notes/10158791368532200/
- https://dev.to/tigt/the-weirdly-obscure-art-of-streamed-html-4gc2
Hmm, this thread seems to imply that streaming with DSD is not possible, and that a DOM is needed server side. For the second part, I wonder if wcc (AST parser) is exempt from that classification and maybe we could stream?