Browse Source

Fix tutorial to have exact translation of example

Fixes #903.
main
Ben Alpert 11 years ago
parent
commit
2c02b6cac7
  1. 11
      docs/tutorial.md

11
docs/tutorial.md

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

Loading…
Cancel
Save