We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents df2e999 + 792dad6 commit 11d2687Copy full SHA for 11d2687
examples/commentsBox/js/app.js
@@ -28,13 +28,13 @@ var CommentList = React.createClass({
28
29
30
var CommentForm = React.createClass({
31
- handleSubmit: function() {
+ handleSubmit: function(event) {
32
+ event.preventDefault();
33
var author = this.refs.author.getDOMNode().value.trim();
34
var text = this.refs.text.getDOMNode().value.trim();
35
this.props.onCommentSubmit({author: author, text: text});
36
this.refs.author.getDOMNode().value = '';
37
this.refs.text.getDOMNode().value = '';
- return false;
38
},
39
40
render: function() {
0 commit comments