evandromacedo / react-simple-snackbar

A really simple React snackbar component ⚛︎
https://evandromacedo.github.io/react-simple-snackbar
MIT License
92 stars 21 forks source link

Strict Mode Warning #9

Open RussMax783 opened 4 years ago

RussMax783 commented 4 years ago

Nice work on such a simple component!

With all the latest of React and this library there is a warning when a snackbar gets toggle on. Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of n 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

Quick sandbox to show the error. https://codesandbox.io/s/react-simple-snackbar-broken-9m9lm?file=/src/App.js

juspky commented 4 years ago

This is caused by react-transition-group https://github.com/reactjs/react-transition-group/issues/668

Bump the dep once this is is fixed

juspky commented 4 years ago

https://github.com/reactjs/react-transition-group/issues/668#issuecomment-695162879

this needs to be done. @evandromacedo

architgarg commented 3 years ago

I had the same problem. Now started using this - https://react-hot-toast.com/