Skip to content

React >= 14.0.0 support. fixes #19#20

Open
bompi88 wants to merge 1 commit into
enigma-io:masterfrom
bompi88:master
Open

React >= 14.0.0 support. fixes #19#20
bompi88 wants to merge 1 commit into
enigma-io:masterfrom
bompi88:master

Conversation

@bompi88
Copy link
Copy Markdown

@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
Copy Markdown

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
Copy Markdown

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