mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Use this.getDOMNode() instead of last argument of componentDidMount
This commit is contained in:
committed by
Paul O’Shannessy
parent
934ef1d4c2
commit
a23d43bf05
@@ -132,7 +132,7 @@ var ReactTransitionableChild = React.createClass({
|
||||
}
|
||||
},
|
||||
|
||||
componentDidMount: function(node) {
|
||||
componentDidMount: function() {
|
||||
if (this.props.enter) {
|
||||
this.transition('enter');
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@ describe('ReactDOM', function() {
|
||||
render: function() {
|
||||
return <form><input type="submit" value="Submit" /></form>;
|
||||
},
|
||||
componentDidMount: function(node) {
|
||||
form = node;
|
||||
componentDidMount: function() {
|
||||
form = this.getDOMNode();
|
||||
}
|
||||
});
|
||||
var instance = ReactTestUtils.renderIntoDocument(<Parent />);
|
||||
|
||||
@@ -40,11 +40,11 @@ var ReactDOMForm = ReactCompositeComponent.createClass({
|
||||
return this.transferPropsTo(form(null, this.props.children));
|
||||
},
|
||||
|
||||
componentDidMount: function(node) {
|
||||
componentDidMount: function() {
|
||||
ReactEventEmitter.trapBubbledEvent(
|
||||
EventConstants.topLevelTypes.topSubmit,
|
||||
'submit',
|
||||
node
|
||||
this.getDOMNode()
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -81,8 +81,8 @@ var ReactDOMInput = ReactCompositeComponent.createClass({
|
||||
return input(props, this.props.children);
|
||||
},
|
||||
|
||||
componentDidMount: function(rootNode) {
|
||||
var id = ReactMount.getID(rootNode);
|
||||
componentDidMount: function() {
|
||||
var id = ReactMount.getID(this.getDOMNode());
|
||||
instancesByReactID[id] = this;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user