Skip to content

Commit

Permalink
Use this.getDOMNode() instead of last argument of componentDidMount
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeux authored and zpao committed Nov 20, 2013
1 parent 934ef1d commit a23d43b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/addons/transitions/ReactTransitionableChild.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ var ReactTransitionableChild = React.createClass({
}
},

componentDidMount: function(node) {
componentDidMount: function() {
if (this.props.enter) {
this.transition('enter');
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/__tests__/ReactDOM-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 />);
Expand Down
4 changes: 2 additions & 2 deletions src/dom/components/ReactDOMForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/dom/components/ReactDOMInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},

Expand Down

0 comments on commit a23d43b

Please sign in to comment.