React 0.13 this.getDOMNode() equivalent to React.findDOMNode()

后端 未结 5 2209
死守一世寂寞
死守一世寂寞 2020-12-13 04:29

This works perfectly fine in React version 0.12:

componentDidMount: function () {
    var dom = this.getDOMNode();
}

The variable dom

5条回答
  •  遥遥无期
    2020-12-13 05:17

    React 15.0.1 Requires this syntax: ReactDOM.findDOMNode

    e.g.

    var x = ReactDOM.findDOMNode(this.refs.author);
    

提交回复
热议问题