Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React component uses deprecated lifecycle methods #43

Open
breeny opened this issue Apr 3, 2019 · 0 comments
Open

React component uses deprecated lifecycle methods #43

breeny opened this issue Apr 3, 2019 · 0 comments

Comments

@breeny
Copy link

breeny commented Apr 3, 2019

componentWillReceiveProps(newProps) {
return onComponentWillReceiveProps(this, this.logger, newProps);
}

As per the React documentation, componentWillReceiveProps is a deprecated method, slated for removal in v17.

One possible solution would be to change the implementation of shouldComponentUpdate and then leverage componentDidUpdate (I am aware of #37 which may or may not make this possible).

Otherwise another option may be to trigger these side effects in the shouldComponentUpdate call, which seems like an anti pattern but is the first and only method that would be called if the implementation stays as returning false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant