4 ms·
If I understand spicyj correctly, I think he's saying in v0.14 a ref of React.DOM will now be the raw DOM node; but it will also contain a getDOMNode method (wh
by daveidol 11y ago
If I understand spicyj correctly, I think he's saying in v0.14 a ref of React.DOM will now be the raw DOM node; but it will also contain a getDOMNode method (which just returns itself) in order to continue working for people expecting the old behavior.
Refs to custom components will work exactly how they did in 0.13. And getDOMNode is deprecated in general (use React.findDOMNode instead).
- spicyj 11y agoThat's right. In almost all cases you should just use a ref now and not call findDOMNode except as an upgrade path, because findDOMNode breaks encapsulation when used on other components.