react-s-alert icon indicating copy to clipboard operation
react-s-alert copied to clipboard

fixes react StrictMode deprecation warnings

Open Nowheresly opened this issue 6 years ago • 3 comments

When using this library with the latest version of React with StrictMode enabled, two different warning are generated:

  • componentWillMount will be removed in React 17 and should no more be used.

  • ReactDOM.findDOMNode will be removed in React 17 and should no more be used.

This PR just follows the official React documentation (here and here) to fix these warnings.

Nowheresly avatar Feb 12 '19 21:02 Nowheresly

Hi, thanks. But I think this version of library won't work with React 17 anyway. It have to be totally rewritten using new approaches in React introduced in newest versions.

And this needs more tests before publishing it.

juliancwirko avatar Feb 12 '19 21:02 juliancwirko

We can't be sure this library will work or not with React 17, but at least with this PR, there is no more any warnings.

As far as the tests are concerned, I was unable to run tests without error. It seems there is an already referenced issue about it (#54 ).

Nowheresly avatar Feb 12 '19 22:02 Nowheresly

Yes, I meant manual tests.

juliancwirko avatar Feb 12 '19 22:02 juliancwirko