@samitouri / QOS-React-2 / commits / 1d4d1a0be6

Making 'native DOM' nodes more explicit in documentation

Vjeux committed Dec 31, 2013 at 01:34 UTC 1d4d1a0be672b70a2b29873a68af6aac8e5fb882
1 file changed +1 -1
docs/docs/ref-03-component-specs.md
+1 -1
@@ -20,7 +20,7 @@ ReactComponent render()
20
21 The `render()` method is required.
22
23 -When called, it should examine `this.props` and `this.state` and return a single child component. This child component can be either a native DOM component (such as `<div>`) or another composite component that you've defined yourself.
23 +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.
24
25 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.
26