Hacker News new | ask | show | jobs
by desuvader 3913 days ago
Wohoo! .getDOMNode() is finally gone!

Edit: Haha, I just noticed that someone else was also happy about this.

Also, now that classnames is standalone module, I recommend that people start using a standalone implementation of keyMirror (for flux) as well!

2 comments

Would you mind explaining? As a jQuery believer, to me this looks like a selector method - getElementByID or something. I'm guessing this is against the whole idea of React.
Refs are simply references to DOM nodes that you have to specify through the ref (HTML) attribute. You can give a DOM node the ref value "foo" and then later reference it in a react component with this.refs.foo (previously this.refs.foo.getDOMNode()).
.getDAMNNode