3 ms·
They've been talking about it for years alongside with SSR streaming. Nothing concrete so far.
by pier25 6y ago
They've been talking about it for years alongside with SSR streaming. Nothing concrete so far.
- mulholio 6y agoI get the sense the React team don't really care about SSR as it's not a massive use case for FB.
- tshaddox 6y agoI thought it was a massive use case for Facebook. I recall seeing Facebook engineering tech talks about how they write their JavaScript with different types of import statements to optimize what gets rendered in SSR versus on the client. I think this is a similar video: https://www.youtube.com/watch?v=KT3XKDBZW7M https://www.youtube.com/watch?v=KT3XKDBZW7M
- sophiebits 6y agoThe React team has been focusing much more on SSR lately. I think it's likely we'll see big things in 2021.
- mulholio 6y agoGood to hear! If that's the case then I'm excited.
- dnissley 6y agoIs this not SSR streaming? https://reactjs.org/docs/react-dom-server.html#rendertonodestream https://reactjs.org/docs/react-dom-server.html#rendertonodes...
- pier25 6y agoI 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 https://github.com/facebook/react/issues/13206
- tshaddox 6y agoYou'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).