Skip to content

Commit

Permalink
Merge pull request #3590 from koba04/patch-1
Browse files Browse the repository at this point in the history
component.render method returns a ReactElement.
  • Loading branch information
sophiebits committed Apr 5, 2015
2 parents aee05c2 + c7a2d46 commit ddbbaa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/docs/ref-03-component-specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ When creating a component class by invoking `React.createClass()`, you should pr
### render

```javascript
ReactComponent render()
ReactElement render()
```

The `render()` method is required.

When called, it should examine `this.props` and `this.state` and return a single child component. This child component can be either a virtual representation of a native DOM component (such as `<div />` or `React.DOM.div()`) or another composite component that you've defined yourself.
When called, it should examine `this.props` and `this.state` and return a single child element. This child element can be either a virtual representation of a native DOM component (such as `<div />` or `React.DOM.div()`) or another composite component that you've defined yourself.

You can also return `null` or `false` to indicate that you don't want anything rendered. Behind the scenes, React renders a `<noscript>` tag to work with our current diffing algorithm. When returning `null` or `false`, `React.findDOMNode(this)` will return `null`.

Expand Down

0 comments on commit ddbbaa9

Please sign in to comment.