mirror of
https://github.com/zhigang1992/reactfire.git
synced 2026-01-12 22:51:28 +08:00
Update app.js
Passed in the click event for preventDefault on handleSubmit
This commit is contained in:
@@ -28,8 +28,8 @@ var CommentList = React.createClass({
|
||||
|
||||
|
||||
var CommentForm = React.createClass({
|
||||
handleSubmit: function() {
|
||||
event.preventDefault();
|
||||
handleSubmit: function(e) {
|
||||
e.preventDefault();
|
||||
var author = this.refs.author.getDOMNode().value.trim();
|
||||
var text = this.refs.text.getDOMNode().value.trim();
|
||||
this.props.onCommentSubmit({author: author, text: text});
|
||||
|
||||
Reference in New Issue
Block a user