[Docs] Render `null` returns noscript now

Following #1495.
This commit is contained in:
Cheng Lou 2014-06-23 13:13:35 -07:00
parent f81e213f41
commit 9d5ad77774
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ 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.
You can also return `null` or `false` to indicate that you don't want anything rendered. Behind the scenes, React renders a `<script>` tag to work with our current diffing algorithm. When returning `null` or `false`, `this.getDOMNode()` will return `null`.
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`, `this.getDOMNode()` will return `null`.
The `render()` function should be *pure*, meaning that it does not modify component state, it returns the same result each time it's invoked, and it does not read from or write to the DOM or otherwise interact with the browser (e.g., by using `setTimeout`). If you need to interact with the browser, perform your work in `componentDidMount()` or the other lifecycle methods instead. Keeping `render()` pure makes server rendering more practical and makes components easier to think about.