Skip to content

Conversation

bompi88
Copy link

@bompi88 bompi88 commented Aug 23, 2016

Use ReactDom.findDOMNode(this) instead of this.getDOMNode() if this.getDOMNode() not available. Also checks if React.findDOMNode is present. If no method is found, throws an error assuming the user is using react >= 14.0.0 that tells the user to pass ReactDom as second argument.

module.exports = function(React) {
module.exports = function(React, ReactDom) {
var _domNode;
if (React.findDOMNode) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking we should reduce the complexity a bit and just always require ReactDOM... what do you think?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with bumping the major version to enforce the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants