Comment

Comment by pietro

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...
parent pietro 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton