Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WARNING: findDOMNode is deprecated in StrictMode, react-redux-notify

I am getting this warning while using, react-redux-notify

index.js:1 Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of CSSTransitionGroupChild which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: ---/react-strict-mode-find-node
    in div (created by Notification)
    in Notification (created by Notify)
    in CSSTransitionGroupChild (created by TransitionGroup)
    in div (created by TransitionGroup)
    in TransitionGroup (created by CSSTransitionGroup)
    in CSSTransitionGroup (created by Notify)
    in div (created by Notify)
    in Notify (created by ConnectFunction)
    in ConnectFunction (at App.js:56)
    in div (at App.js:55)
    in Provider (at App.js:54)
    in App (at src/index.js:9)
    in StrictMode (at src/index.js:8)

How to correct this?

like image 301
raju Avatar asked Dec 18 '22 13:12

raju


1 Answers

This is an error probably from a library you are using to say that the ReactDOM.findDOMNode function is now deprecated but it still works (it may be removed in the future).

In StrictMode, the error will show up but it is not advisable to remove StrictMode because of the error! It is better to ignore this error or reach out to the library causing this by reporting the issue.

FYI this is a known issue in react-bootstrap.

like image 158
Anthony Avatar answered Dec 31 '22 01:12

Anthony