minhtranite / react-notifications

Notification component for ReactJS
https://www.npmjs.com/package/react-notifications
287 stars 65 forks source link

Error: in izomorphic app in server render memory leaks! #13

Open royroev opened 8 years ago

royroev commented 8 years ago

profiler and headsnapshot rules!)

ahromyak commented 6 years ago

I am not recommending using this lib because it causes memory leaks all the time.

CharlesCarnell commented 6 years ago

Adding on to this, we've had to completely remove this from production after a week of sporadic downtime due to memleaks originating from this package.

Absolutely do not use this package in an isomorphic / universal application until this has been resolved.

philn5d-ar commented 5 years ago

After some review of the code and debugging, this is caused by the event registration componentWillMount lifecycle of the NotificationContainer. This is not the correct place to register events and a few other issues in here are related to this issue. I'm lobbying for a quick resolution since this would effect those using React 15 and 16. Once React 17 is out, this will be broken altogether.

https://react-legacy.netlify.com/docs/react-component.html#componentwillmount

And for the resolution, see:

https://reactjs.org/docs/react-component.html#unsafe_componentwillmount