Skip to content

Commit a138b75

Browse files
committed
Merge pull request #30 from rickbeerendonk/master
Corrected character casing and omission
2 parents 7dcdd54 + 558dd49 commit a138b75

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

site/jekyll/getting-started/tutorial.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ var CommentForm = React.createClass({
706706

707707
Now that the callbacks are in place, all we have to do is submit to the server and refresh the list:
708708

709-
```javascript{12-21}
709+
```javascript{12-21,44}
710710
var CommentBox = React.createClass({
711711
loadCommentsFromServer: function() {
712712
var xhr = new XMLHttpRequest();
@@ -719,8 +719,8 @@ var CommentBox = React.createClass({
719719
},
720720
handleCommentSubmit: function(comment) {
721721
var data = new FormData();
722-
data.append('Author', comment.Author);
723-
data.append('Text', comment.Text);
722+
data.append('Author', comment.author);
723+
data.append('Text', comment.text);
724724
725725
var xhr = new XMLHttpRequest();
726726
xhr.open('post', this.props.submitUrl, true);
@@ -748,6 +748,11 @@ var CommentBox = React.createClass({
748748
);
749749
}
750750
});
751+
752+
React.renderComponent(
753+
<CommentBox url="/comments" submitUrl="/comments/new" pollInterval={2000} />,
754+
document.getElementById('content')
755+
);
751756
```
752757

753758
## Congrats!

0 commit comments

Comments
 (0)