Skip to content

Commit

Permalink
Fix for code review coment #10024 (comment) . Thanks to @aweary for t…
Browse files Browse the repository at this point in the history
…he suggestion.
  • Loading branch information
aickin committed Jun 22, 2017
1 parent af4e89c commit b8f2529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/reference-react-dom-node-stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The `ReactDOMNodeStream` class allows you to render your components in Node.js a
ReactDOMNodeStream.renderToStream(element)
```

Render a React element to its initial HTML. This should only be used in Node.js; it will not work in the browser, since the browser does not support Node.js streams. React will return a [Readable stream](https://nodejs.org/api/stream.html#stream_readable_streams) that outputs an HTML string. The HTML output by this stream should be character-for-character equivalent to the output of [ReactDOMServer.renderToString](https://facebook.github.io/react/docs/react-dom-server.html#rendertostring). You can use this method to generate HTML on the server and send the markup down on the initial request for faster page loads and to allow search engines to crawl your pages for SEO purposes.
Render a React element to its initial HTML. This should only be used in Node.js; it will not work in the browser, since the browser does not support Node.js streams. React will return a [Readable stream](https://nodejs.org/api/stream.html#stream_readable_streams) that outputs an HTML string. The HTML output by this stream will be exactly equal to what [`ReactDOMServer.renderToString`](https://facebook.github.io/react/docs/react-dom-server.html#rendertostring) would return. You can use this method to generate HTML on the server and send the markup down on the initial request for faster page loads and to allow search engines to crawl your pages for SEO purposes.

If you call [`ReactDOM.render()`](/react/docs/react-dom.html#render) on a node that already has this server-rendered markup, React will preserve it and only attach event handlers, allowing you to have a very performant first-load experience.

Expand Down

0 comments on commit b8f2529

Please sign in to comment.