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

Replace ReactDOM.findDOMNode() with ref. #71

Merged
merged 1 commit into from
Nov 27, 2018

Conversation

syedirashid
Copy link
Contributor

Replaced findDOMNode with refs which is a more explicit and preferred method of accessing underlying DOM nodes. See:

https://reactjs.org/docs/react-dom.html#finddomnode
https://reactjs.org/docs/strict-mode.html#warning-about-deprecated-finddomnode-usage
jsx-eslint/eslint-plugin-react#678

Incidentally, this also resolves issue #70 where the "Unable to find node on an unmounted component" exception is thrown possibly due to different libraries using different versions of react-dom in the same project.

Copy link
Collaborator

@D-TUCKER D-TUCKER left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@D-TUCKER D-TUCKER merged commit 0f6ca3f into schovi:master Nov 27, 2018
@syedirashid
Copy link
Contributor Author

Awesome. @D-TUCKER are you able to publish the latest to npm?

@D-TUCKER
Copy link
Collaborator

D-TUCKER commented Dec 1, 2018

Hmm good question. I don't have access to do that right now. I assume @schovi will either need to do it or give me access to do it.

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.

Unable to find node on an unmounted component.
2 participants