We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d47d509 commit d3cee1eCopy full SHA for d3cee1e
docs/docs/tutorial.md
@@ -629,8 +629,8 @@ var CommentBox = React.createClass({
629
},
630
handleCommentSubmit: function(comment) {
631
var comments = this.state.data;
632
- comments.push(comment);
633
- this.setState({data: comments});
+ var newComments = comments.concat([comment]);
+ this.setState({data: newComments});
634
$.ajax({
635
url: this.props.url,
636
type: 'POST',
0 commit comments