Should I use ref or findDOMNode to get react root dom node of an element? Should I use ref or findDOMNode to get react root dom node of an element? reactjs reactjs

Should I use ref or findDOMNode to get react root dom node of an element?


If I refer to the doc (https://facebook.github.io/react/docs/react-dom.html#finddomnode), findDOMNode seems to be more a trick than a real option. The ref seems to be the best option. The doc implements the same draft you gave here (with the ref={(n) => this.node = n})