From 23d90ff554218a047f49d22b909d96d3cf73a335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Wed, 5 Nov 2014 16:20:39 -0800 Subject: [PATCH] Update to latest Includes #2463, #2434 --- docs/reusable-components.html | 12 ++++++------ docs/top-level-api.html | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/reusable-components.html b/docs/reusable-components.html index 1858b49c74d09..b4ea6b316dde8 100644 --- a/docs/reusable-components.html +++ b/docs/reusable-components.html @@ -393,12 +393,12 @@

Prop Validation optionalObject: React.PropTypes.object, optionalString: React.PropTypes.string, - // Anything that can be rendered: numbers, strings, components or an array + // Anything that can be rendered: numbers, strings, elements or an array // containing these types. - optionalRenderable: React.PropTypes.renderable, + optionalNode: React.PropTypes.node, - // A React component. - optionalComponent: React.PropTypes.component, + // A React element. + optionalElement: React.PropTypes.element, // You can also declare that a prop is an instance of a class. This uses // JS's instanceof operator. @@ -473,11 +473,11 @@

Transferring Prop document.getElementById('example') );

Single Child #

-

With React.PropTypes.component you can specify that only a single child can be passed to +

With React.PropTypes.element you can specify that only a single child can be passed to a component as children.

var MyComponent = React.createClass({
   propTypes: {
-    children: React.PropTypes.component.isRequired
+    children: React.PropTypes.element.isRequired
   },
 
   render: function() {
diff --git a/docs/top-level-api.html b/docs/top-level-api.html
index 6a0a5028f06c7..ece42b7c6a15d 100644
--- a/docs/top-level-api.html
+++ b/docs/top-level-api.html
@@ -408,12 +408,12 @@ 

React.render React.unmountComponentAtNode #

boolean unmountComponentAtNode(DOMElement container)
 

Remove a mounted React component from the DOM and clean up its event handlers and state. If no component was mounted in the container, calling this function does nothing. Returns true if a component was unmounted and false if there was no component to unmount.

-

React.renderToString #

string renderToString(ReactComponent component)
+

React.renderToString #

string renderToString(ReactElement element)
 
-

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.

+

Render a ReactElement 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.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.

-

React.renderToStaticMarkup #

string renderToStaticMarkup(ReactComponent component)
+

React.renderToStaticMarkup #

string renderToStaticMarkup(ReactElement element)
 

Similar to renderToString, except this doesn't create extra DOM attributes such as data-react-id, that React uses internally. This is useful if you want to use React as a simple static page generator, as stripping away the extra attributes can save lots of bytes.

React.isValidElement #

boolean isValidElement(* object)