@samitouri / QOS-React-2 / commits / 4c1a737343

docs(ServerRendering): Reflect renderComponentToString changes

Ben Ripkens committed Feb 6, 2014 at 07:56 UTC 4c1a73734314fee02de3b279c2a1987a338c2b77
1 file changed +2 -2
docs/docs/ref-01-top-level-api.md
+2 -2
@@ -98,9 +98,9 @@ Remove a mounted React component from the DOM and clean up its event handlers an
98 ### React.renderComponentToString
99
100 ```javascript
101 -renderComponentToString(ReactComponent component, function callback)
101 +string renderComponentToString(ReactComponent component)
102 ```
103
104 -Render a component to its initial HTML. This should only be used on the server. React will call `callback` with an HTML string when the markup is ready. You can use this method to can 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.
104 +Render a component to its initial HTML. This should only be used on the server. React will return an HTML string. 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.
105
106 If you call `React.renderComponent()` 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.