Skip to content

React 16.3+: replace componentWillReceiveProps with componentDidUpdate #7

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simmerer
Copy link

This fix employs componentDidUpdate instead of getDerivedStateFromProps since the previous usage of componentWillReceiveProps here wasn't updating state.

Here's a good explainer of the various deprecated lifecycle methods and how best to replace them: https://itnext.io/react17-or-how-to-get-rid-of-componentwillreceiveprops-c91f9a6f6f03

Same change as JodusNodus#141

This fix employs componentDidUpdate instead of getDerivedStateFromProps since the previous usage of componentWillReceiveProps wasn't updating state.
@tahv0
Copy link
Owner

tahv0 commented Nov 23, 2019

Thanks for PR. I'll check this.

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

Successfully merging this pull request may close these issues.

2 participants