mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-22 20:01:57 +00:00
Remove some getDOMNode from docs and examples
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user