Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React >= 14.0.0 support. fixes #19 #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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) {
Copy link
Contributor

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?

Copy link
Contributor

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