From 4c1a73734314fee02de3b279c2a1987a338c2b77 Mon Sep 17 00:00:00 2001 From: Ben Ripkens Date: Thu, 6 Feb 2014 07:56:37 +0100 Subject: [PATCH] docs(ServerRendering): Reflect renderComponentToString changes --- docs/docs/ref-01-top-level-api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/ref-01-top-level-api.md b/docs/docs/ref-01-top-level-api.md index 8c592c502f5..d6a29053833 100644 --- a/docs/docs/ref-01-top-level-api.md +++ b/docs/docs/ref-01-top-level-api.md @@ -98,9 +98,9 @@ Remove a mounted React component from the DOM and clean up its event handlers an ### React.renderComponentToString ```javascript -renderComponentToString(ReactComponent component, function callback) +string renderComponentToString(ReactComponent component) ``` -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. +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. 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.