News for hackers. Stuff that matters.
Re:React 0.14 Release Candidate by daveidol on Thursday September 10, 2015 @01:56PM (#10199503)
I'm very excited about this release!

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?

Re:React 0.14 Release Candidate by spicyj on Thursday September 10, 2015 @01:56PM (#10199505)
Yes, they'll work with a warning until 0.15.
Re:React 0.14 Release Candidate by daveidol on Thursday September 10, 2015 @01:58PM (#10199520)
You guys are the best :)
Re:React 0.14 Release Candidate by seivan on Thursday September 10, 2015 @02:01PM (#10199541)
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.
Re:React 0.14 Release Candidate by spicyj on Thursday September 10, 2015 @02:03PM (#10199546)
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.
Re:React 0.14 Release Candidate by mikewhy on Thursday September 10, 2015 @02:16PM (#10199611)
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.

Re:React 0.14 Release Candidate by daveidol on Thursday September 10, 2015 @02:23PM (#10199662)
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).

Re:React 0.14 Release Candidate by spicyj on Thursday September 10, 2015 @02:34PM (#10199739)
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.