Yes, they'll work with a warning until 0.15.
You guys are the best :)
I think most UI components (like material-react) will break because ref now returns the dom object and not a reference to the component, or something along those lines, correct me if I am wrong.
In this release, we do patch .getDOMNode() onto DOM nodes that are returned as refs so this should continue to work. File an issue if it doesn't. If your code has no warnings in 0.13, you should be able to upgrade immediately, with the exception of the two minor breaking changes mentioned at the end of the "Breaking changes" section.
So:
- a `ref` of your own component will be the component instance, complete with `getDOMNode`
- a `ref` of React.DOM will be the DOM node
Just seems weirdly confusing.
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).
That'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.
Question for other React devs out there: how long would you typically expect it to be before we can start migrating over?
Will older React components designed for 0.13 still work if they don't include the react-dom package?