<p dir="auto">On a page with many dynamic components, it can be slow to render the page. If we can stream components down when it's ready asynchronously, we can improve the initial byte speed.</p>
<p dir="auto">See example:<br>
<a href="https://github.com/aickin/react-dom-stream">https://github.com/aickin/react-dom-stream</a></p>
<p dir="auto">I suggest to stream-render <code class="notranslate">pages &gt; 50KB</code> <a href="https://github.com/aickin/react-dom-stream#when-should-you-use-react-dom-stream">(hypothetical stream overhead)</a> to reduce TTFB and CPU load.</p>
<ul dir="auto">
<li>Inferno offers <code class="notranslate">streamAsString</code>, <code class="notranslate">streamAsStaticMarkup</code>, <code class="notranslate">streamQueueAsString</code>, <code class="notranslate">streamQueueAsStaticMarkup</code> with <a href="https://github.com/infernojs/inferno/blob/master/packages/inferno-server/src/index.ts">inferno-server (master)</a>. As of 1.2.1, <a href="https://github.com/infernojs/inferno-website/blob/master/src/docs/api/inferno-server.md#render-stream-api">the stream renderer was experimental and 10-15% slower than <code class="notranslate">renderToString</code></a>. Should wait for 1.3 (currently <a href="https://github.com/infernojs/inferno/releases/tag/v1.3.0-rc.3">RC3</a>).</li>
<li>React with <a href="https://github.com/aickin/react-dom-stream">aickin/react-dom-stream</a>, which replaces <code class="notranslate">renderToString</code> and <code class="notranslate">renderToStaticMarkup</code>.</li>
<li><a href="https://github.com/thysultan/dio.js">thysultan/dio.js</a> with <a href="https://github.com/thysultan/dio.js#rendertostream"><code class="notranslate">renderToStream</code></a> <a href="https://github.com/thysultan/dio.js/blob/master/src/SSR/renderToStream.js">(SSR/renderToStream.js)</a>.</li>
</ul>
<p dir="auto">It would supersede <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="200807529" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/767" data-hovercard-type="pull_request" data-hovercard-url="/vercel/next.js/pull/767/hovercard" href="https://github.com/vercel/next.js/pull/767">#767</a>. Preact does not support streaming (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="128989291" data-permission-text="Title is private" data-url="https://github.com/preactjs/preact/issues/23" data-hovercard-type="issue" data-hovercard-url="/preactjs/preact/issues/23/hovercard?comment_id=226954130&amp;comment_type=issue_comment" href="https://github.com/preactjs/preact/issues/23#issuecomment-226954130">preactjs/preact#23 (comment)</a>).</p>