React v0.14.0 Do not access .getDOMNode()
See original GitHub issueI just switched to React 0.14.0 and I’m getting below warning:
ReactDOMComponent: Do not access .getDOMNode() of a DOM node; instead, use the node directly. This DOM node was rendered by Typeahead
.
componentWillMount this.onCity = function(city){ if (this.props.action) { Dispatcher.dispatch(this.props.action, { country: ReactDOM.findDOMNode(this.refs.country).value, city: city }); } }.bind(this); render (<Typeahead options={cities} maxVisible={2} onOptionSelected={this.onCity} value={this.props.city} />
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
React v0.14 – React Blog
As with refs, this change does not affect custom components. With this change, we're deprecating .getDOMNode() and replacing it with ReactDOM.
Read more >ReactJS findDOMNode and getDOMNode are not functions
14.0 is out of the React core, so I made a few changes to my code: var React = require('react'); var ReactDOM =...
Read more >ReactJS findDOMNode and getDOMNode are not functions
I'm building a web-app with ReactJS and Flux and I'm trying to get the node of my current div using the method findDOMNode...
Read more >React.js (v0.14) cheatsheet - Devhints
setState() . These are not called for initial renders. See reference. Unmounting. componentWillUnmount(), Invoked before DOM ...
Read more >React v0.13.0 Release - GitClear
findDOMNode(component) , which should be used in place of component.getDOMNode() . The base class for ES6-based components will not have getDOMNode .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @bobiblazeski,
What happens if you change:
to:
?
@fmoo Thanks. Solved.