Hacker Newsnew | past | comments | ask | show | jobs | submitlogin



I could be wrong, but I don't think so, no.

> The HTML output by this stream is exactly equal to what ReactDOMServer.renderToString would return.

I imagine this returns a stream as a convenience for Node servers that are streaming chunks of HTML. I don't think it means that React's SSR is rendering chunks of HTML in an async fashion and returning each chunk to the stream as soon as it's ready.

Also look at the last task of suspense:

> Implement a streaming server renderer

https://github.com/facebook/react/issues/13206


You're right. ReactDOMServer.renderToNodeStream is to support HTML streaming, which can allow the browser to start rendering the (as far as it knows, static HTML) document before it receives all the HTML. This is nice, but probably is not a huge factor if you're using HTTP caching via a CDN or a static site generator (since the CDN will likely support HTML streaming).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: