Fix tutorial to have exact translation of example

Fixes #903.
This commit is contained in:
Ben Alpert
2014-05-28 10:28:38 -07:00
parent e3f319a1ca
commit 2c02b6cac7

View File

@@ -88,18 +88,17 @@ The first thing you'll notice is the XML-ish syntax in your JavaScript. We have
```javascript
// tutorial1-raw.js
var CommentBox = React.createClass({
var CommentBox = React.createClass({displayName: 'CommentBox',
render: function() {
return (
React.DOM.div({
className: 'commentBox',
children: 'Hello, world! I am a CommentBox.'
})
React.DOM.div({className: "commentBox"},
"Hello, world! I am a CommentBox."
)
);
}
});
React.renderComponent(
CommentBox({}),
CommentBox(null),
document.getElementById('content')
);
```