react-notifications icon indicating copy to clipboard operation
react-notifications copied to clipboard

Getting this error when notification is received,findDOMNode is deprecated in StrictMode.

Open saudkhan1391 opened this issue 4 years ago • 15 comments

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: https://fb.me/react-strict-mode-find-node

saudkhan1391 avatar Aug 08 '20 09:08 saudkhan1391

Any solutions ?

saudkhan1391 avatar Aug 15 '20 12:08 saudkhan1391

It might be fixed by PR #20 since it changes how the CSS Transition Group is used. I'll let you know when that is merged, and you can see if that fixes your issue.

tjrexer avatar Aug 29 '20 02:08 tjrexer

Thanks. I'ill be waiting for the merge.

saudkhan1391 avatar Aug 29 '20 11:08 saudkhan1391

Just published 1.7.0 which includes updates to react-transition-group. Check to see if that resolves your issue.

tjrexer avatar Sep 12 '20 00:09 tjrexer

1.7.2 version, this warning is still logging while notification is appearing

ogzhnozlci avatar Dec 21 '20 11:12 ogzhnozlci

@tjrexer https://github.com/reactjs/react-transition-group/blob/master/CHANGELOG.md#features I don't see nodeRef prop being created and passed through CSSTransition and Notification, maybe that's why we are still getting this warning?

brenobaptista avatar Jan 22 '21 20:01 brenobaptista

same. No solution?

karelkryda avatar Mar 25 '21 23:03 karelkryda

This was fixed I think.

saudkhan1391 avatar Mar 26 '21 09:03 saudkhan1391

@saudkhan1391 I'm still getting this error in console image

karelkryda avatar Mar 26 '21 14:03 karelkryda

image

karelkryda avatar Mar 26 '21 14:03 karelkryda

Don't use in strictMode. Try using it inside <Router or <appoloProvide .

saudkhan1391 avatar Mar 26 '21 18:03 saudkhan1391

@saudkhan1391 still same, I triend inside Apollo and also inside Router image

karelkryda avatar Mar 26 '21 18:03 karelkryda

no answer to this?

Also tried inside Router and i still get the warning

marcosdipaolo avatar Aug 17 '21 21:08 marcosdipaolo

The issue still persists in the latest build.

alexshmyrkov avatar Mar 15 '22 20:03 alexshmyrkov

I have not been able to find anything causing the warning. Only warnings I'm seeing is regarding componentWillX & am working on that fix.

tjrexer avatar Jul 11 '22 02:07 tjrexer