Remove unnecessary findDOMNode calls (#8198)

This commit is contained in:
Samer Buna
2016-11-08 13:15:01 -08:00
committed by Dan Abramov
parent a24967fc25
commit cc35432e9b

View File

@@ -21,7 +21,7 @@ var CodeMirrorEditor = React.createClass({
componentDidMount: function() {
if (IS_MOBILE) return;
this.editor = CodeMirror.fromTextArea(ReactDOM.findDOMNode(this.refs.editor), {
this.editor = CodeMirror.fromTextArea(this.refs.editor, {
mode: 'jsx',
lineNumbers: this.props.lineNumbers,
lineWrapping: true,
@@ -200,7 +200,7 @@ var ReactPlayground = React.createClass({
},
executeCode: function() {
var mountNode = ReactDOM.findDOMNode(this.refs.mount);
var mountNode = this.refs.mount;
try {
ReactDOM.unmountComponentAtNode(mountNode);