Skip to content

Commit

Permalink
Remove deprecated method
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocoelho committed Mar 21, 2015
1 parent 58f6fc2 commit 160de38
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/scripts/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ var CommentList = React.createClass({
var CommentForm = React.createClass({
handleSubmit: function(e) {
e.preventDefault();
var author = this.refs.author.getDOMNode().value.trim();
var text = this.refs.text.getDOMNode().value.trim();
var author = React.findDOMNode(this.refs.author).value.trim();
var text = React.findDOMNode(this.refs.text).value.trim();
if (!text || !author) {
return;
}
this.props.onCommentSubmit({author: author, text: text});
this.refs.author.getDOMNode().value = '';
this.refs.text.getDOMNode().value = '';
React.findDOMNode(this.refs.author).value = '';
React.findDOMNode(this.refs.text).value = '';
},
render: function() {
return (
Expand Down

0 comments on commit 160de38

Please sign in to comment.