Skip to content

Commit

Permalink
Remove rootNode from componentDidMount and componentDidUpdate
Browse files Browse the repository at this point in the history
We can already access the DOM node using `this.getDOMNode()`. Passing it as an argument was a bad decision.

Previous API:

```
componentDidMount(DOMElement rootNode)
componentDidUpdate(object prevProps, object prevState, object prevContext, DOMElement rootNode)
```

Next API:

```
componentDidMount()
componentDidUpdate(object prevProps, object prevState, object prevContext)
```
  • Loading branch information
vjeux authored and zpao committed Nov 20, 2013
1 parent 2fe2cd5 commit e73900d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/ReactMountReady.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ mixInto(ReactMountReady, {
for (var i = 0, l = queue.length; i < l; i++) {
var component = queue[i].component;
var callback = queue[i].callback;
callback.call(component, component.getDOMNode());
callback.call(component);
}
queue.length = 0;
}
Expand Down

0 comments on commit e73900d

Please sign in to comment.