@samitouri / QOS-React-2 / commits / a23d43bf05

Use this.getDOMNode() instead of last argument of componentDidMount

Christopher Chedeau committed Nov 20, 2013 at 14:03 UTC a23d43bf05af6bbd92e5c467db31bb4483056274
4 files changed +7 -7
src/addons/transitions/ReactTransitionableChild.js
+1 -1
@@ -132,7 +132,7 @@ var ReactTransitionableChild = React.createClass({
132 }
133 },
134
135 - componentDidMount: function(node) {
135 + componentDidMount: function() {
136 if (this.props.enter) {
137 this.transition('enter');
138 }
src/core/__tests__/ReactDOM-test.js
+2 -2
@@ -46,8 +46,8 @@ describe('ReactDOM', function() {
46 render: function() {
47 return <form><input type="submit" value="Submit" /></form>;
48 },
49 - componentDidMount: function(node) {
50 - form = node;
49 + componentDidMount: function() {
50 + form = this.getDOMNode();
51 }
52 });
53 var instance = ReactTestUtils.renderIntoDocument(<Parent />);
src/dom/components/ReactDOMForm.js
+2 -2
@@ -40,11 +40,11 @@ var ReactDOMForm = ReactCompositeComponent.createClass({
40 return this.transferPropsTo(form(null, this.props.children));
41 },
42
43 - componentDidMount: function(node) {
43 + componentDidMount: function() {
44 ReactEventEmitter.trapBubbledEvent(
45 EventConstants.topLevelTypes.topSubmit,
46 'submit',
47 - node
47 + this.getDOMNode()
48 );
49 }
50 });
src/dom/components/ReactDOMInput.js
+2 -2
@@ -81,8 +81,8 @@ var ReactDOMInput = ReactCompositeComponent.createClass({
81 return input(props, this.props.children);
82 },
83
84 - componentDidMount: function(rootNode) {
85 - var id = ReactMount.getID(rootNode);
84 + componentDidMount: function() {
85 + var id = ReactMount.getID(this.getDOMNode());
86 instancesByReactID[id] = this;
87 },
88