diff --git a/examples/commentsBox/js/app.js b/examples/commentsBox/js/app.js index 9bba597c..584feef4 100644 --- a/examples/commentsBox/js/app.js +++ b/examples/commentsBox/js/app.js @@ -28,13 +28,13 @@ var CommentList = React.createClass({ var CommentForm = React.createClass({ - handleSubmit: function() { + handleSubmit: function(event) { + event.preventDefault(); var author = this.refs.author.getDOMNode().value.trim(); var text = this.refs.text.getDOMNode().value.trim(); this.props.onCommentSubmit({author: author, text: text}); this.refs.author.getDOMNode().value = ''; this.refs.text.getDOMNode().value = ''; - return false; }, render: function() {