React.Children provides utilities for dealing with the this.props.children opaque data structure.
React.DOM provides convenience wrappers around React.createElement for DOM components.
React.DOM provides convenience wrappers around React.createElement for DOM components. These should only be used when not using JSX. For example, React.DOM.div(null, 'Hello World!')
Clone and return a new ReactElement
using element
as the starting point.
Clone and return a new ReactElement
using element
as the starting point.
The resulting element will have the original element's props with the new props merged in shallowly.
New children will replace existing children. Unlike React.addons.cloneWithProps
, key
and ref
from the
original element will be preserved. There is no special behavior for merging any props (unlike cloneWithProps
).
Create a component given a specification.
Create a component given a specification. A component implements a render method which returns one single child. That child may have an arbitrarily deep child structure. One thing that makes components different than standard prototypal classes is that you don't need to call new on them. They are convenience wrappers that construct backing instances (via new) for you.
Create and return a new ReactElement
of the given type.
Create and return a new ReactElement
of the given type. The type argument can be either an html tag name string
(eg. 'div', 'span', etc), or a ReactClass (created via React.createClass).
Create and return a new ReactElement
of the given type.
Create and return a new ReactElement
of the given type. The type argument can be either an html tag name string
(eg. 'div', 'span', etc), or a ReactClass (created via React.createClass).
Return a function that produces ReactElements of a given type.
Return a function that produces ReactElements of a given type. Like React.createElement
, the type argument can be
either an html tag name string (eg. 'div', 'span', etc), or a ReactClass.
Return a function that produces ReactElements of a given type.
Return a function that produces ReactElements of a given type. Like React.createElement
, the type argument can be
either an html tag name string (eg. 'div', 'span', etc), or a ReactClass.
Verifies the object is a ReactElement.
Similar to renderToString, except this doesn't create extra DOM attributes such as data-react-id
, that React
uses internally.
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.
Render a ReactElement to its initial HTML.
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 ReactDOM.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.
(Since version 0.10.0) As of React 0.14, you must use ReactDOM.findDOMNode instead.
(Since version 0.10.0) As of React 0.14, you must use ReactDOM.render instead.
(Since version 0.10.0) As of React 0.14, you must use ReactDOM.render instead.
(Since version 0.10.0) As of React 0.14, you must use ReactDOM.render instead.
(Since version 0.10.0) As of React 0.14, you must use ReactDOM.render instead.
(Since version 0.10.0) As of React 0.14, you must use ReactDOM.unmountComponentAtNode instead.