|
|
|
|
|
by pietro
3631 days ago
|
|
From what Dan Abramov has been posting on Twitter recently, findDOMNode() is in the process of being deprecated, so rather than writing const component = ReactDOM.findDOMNode(TestUtils.renderIntoDocument(
<MyComponent {...props} />
));
we should be writing let node;
const component = TestUtils.renderIntoDocument(
<MyComponent {...props} ref={n => node = n}/>
);
https://gist.github.com/gaearon/7f0e03d3028016bfabfad641720d... |
|