From 6f25cb7b3e3e0ec17027f4b7edfe45efe334e5ae Mon Sep 17 00:00:00 2001 From: Cheng Lou Date: Thu, 2 Apr 2015 17:23:27 -0400 Subject: [PATCH] Remove some `getDOMNode` from docs and examples --- _js/examples/markdown.js | 2 +- _js/live_editor.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_js/examples/markdown.js b/_js/examples/markdown.js index cc43db49..cbb50fe5 100644 --- a/_js/examples/markdown.js +++ b/_js/examples/markdown.js @@ -6,7 +6,7 @@ var MarkdownEditor = React.createClass({ return {value: 'Type some *markdown* here!'}; }, handleChange: function() { - this.setState({value: this.refs.textarea.getDOMNode().value}); + this.setState({value: React.findDOMNode(this.refs.textarea).value}); }, render: function() { return ( diff --git a/_js/live_editor.js b/_js/live_editor.js index 0ffc203d..7ca5db35 100644 --- a/_js/live_editor.js +++ b/_js/live_editor.js @@ -21,7 +21,7 @@ var CodeMirrorEditor = React.createClass({ componentDidMount: function() { if (IS_MOBILE) return; - this.editor = CodeMirror.fromTextArea(this.refs.editor.getDOMNode(), { + this.editor = CodeMirror.fromTextArea(React.findDOMNode(this.refs.editor), { mode: 'javascript', lineNumbers: this.props.lineNumbers, lineWrapping: true, @@ -194,7 +194,7 @@ var ReactPlayground = React.createClass({ }, executeCode: function() { - var mountNode = this.refs.mount.getDOMNode(); + var mountNode = React.findDOMNode(this.refs.mount); try { React.unmountComponentAtNode(mountNode);