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

[docs] Add How can I access the DOM element? in the FAQ #9768

Merged
merged 1 commit into from Jan 7, 2018

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Jan 6, 2018

In most cases, you can attach a ref to the DOM node and avoid using findDOMNode at all.

The React documentation is making findDOMNode() an escape hatch. But we don't fall under the most cases part. Maintaining a list of rootRef property would be an important pain in comparison to this alternative. We don't do it nor react-bootstrap, nor all the react libraries I'm aware of.
So we need an answer to this problem. It's the best one I can think for now. The React core team is looking into alternatives to the current ref implementation: facebook/react#11401. The situation might change in the future.

cc @cherniavskii

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Jan 6, 2018
@cherniavskii
Copy link
Member

Cool, it's definitely worth to document it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants