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 58f6fc2 + 160de38 commit cbe73b7Copy full SHA for cbe73b7
public/scripts/example.js
@@ -101,14 +101,14 @@ var CommentList = React.createClass({
101
var CommentForm = React.createClass({
102
handleSubmit: function(e) {
103
e.preventDefault();
104
- var author = this.refs.author.getDOMNode().value.trim();
105
- 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();
106
if (!text || !author) {
107
return;
108
}
109
this.props.onCommentSubmit({author: author, text: text});
110
- this.refs.author.getDOMNode().value = '';
111
- this.refs.text.getDOMNode().value = '';
+ React.findDOMNode(this.refs.author).value = '';
+ React.findDOMNode(this.refs.text).value = '';
112
},
113
render: function() {
114
return (
0 commit comments