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

renamed deprecated unsafe lifecycle methods

Open user12043 opened this issue 5 years ago • 4 comments

As of react 16.3, componentWillMount, componentWillUpdate and componentWillReceiveProps lifecycle methods needs to be renamed to supress the warning about deprecation.

warning

more info here: https://hackernoon.com/problematic-react-lifecycle-methods-are-going-away-in-react-17-4216acc7d58b

user12043 avatar Sep 09 '19 06:09 user12043

Are you guys going to PR this and do another release soon? This is causing issues with SSR since your event registration happens on the server (it causes a memory leak) when this component is in page that's rendered dynamically on the server. It basically turns SSR server into a hobbling zombie.

philn5d-ar avatar Oct 24 '19 14:10 philn5d-ar

I am not going to do release new version. But to fix this issue I need to upgrade the react version too. I am going to make a commit to do this. Maybe your problem is about old version of react. Are you using the same react version with react-notifications in your project?

user12043 avatar Oct 24 '19 14:10 user12043

react 16.

philn5d-ar avatar Oct 24 '19 15:10 philn5d-ar

But even in React 15, it is not the right place for registering events.

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

philn5d-ar avatar Oct 24 '19 15:10 philn5d-ar