enzyme-adapter-react-18 icon indicating copy to clipboard operation
enzyme-adapter-react-18 copied to clipboard

ShallowWrapper.text() function displays following warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference.

Open ahmm16 opened this issue 8 months ago • 0 comments

Every time that I use ShallowWrapper.text() function it displays the warning that I mentioned in the title, findDOMNode is disapproved by React in strict mode and this function is inside of your project:

ReactEighteenAdapter.js, line 248. return react_dom_1.default.findDOMNode(item.instance);

Do you have any suggestion to deal with this problem? I tried several time to use the Ref as the warning suggests but I couldn't find a solution.

ahmm16 avatar Jun 12 '24 15:06 ahmm16