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 -> Warning: module.exports.getDOMNode(...) is deprecated. Please use ReactDOM.findDOMNode(instance) instead. #760

Closed
desduvauchelle opened this issue Jan 26, 2016 · 4 comments

Comments

@desduvauchelle
Copy link

Hello.

Thanks for the awesome plugin!

Little issue when I use it with React v0.14.6

I get the following errors:

Warning: module.exports.getDOMNode(...) is deprecated. Please use ReactDOM.findDOMNode(instance) instead.
Warning: ReactDOMComponent: Do not access .getDOMNode() of a DOM node; instead, use the node directly. This DOM node was rendered by module.exports.

After some brain scratching (I'm a React noob), I found that changing line 137 from

DOMNode = this.getDOMNode() ? (this.refs[options.ref] || this).getDOMNode() : this.refs[options.ref] || this;

TO

DOMNode = this.refs[options.ref] || this;
``
Removes the warning. 
I'm writing this in case others run into the issue or if you would like to fix it. 

Hope this helps. 



@RubaXa
Copy link
Collaborator

RubaXa commented Feb 2, 2016

@RubaXa RubaXa closed this as completed Feb 2, 2016
@sungwoncho
Copy link

@desduvauchelle could you open a PR?

Edit

nvm. There is a pending PR: #612

@2999
Copy link

2999 commented Mar 28, 2016

@RubaXa could you publish it to npm?

@RubaXa
Copy link
Collaborator

RubaXa commented Mar 28, 2016

@jiangzhizi To do this, need to test the dev-branch, but I don't have time for this.

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

No branches or pull requests

4 participants