raju
raju

Reputation: 6936

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?

Upvotes: 4

Views: 13437

Answers (1)

Anthony
Anthony

Reputation: 212

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.

Upvotes: 5

Related Questions