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

feature : use getDerivedStateFromProps instead of componentWillReceiveProps #3374

Closed
p2227 opened this issue Jan 22, 2019 · 3 comments
Closed

Comments

@p2227
Copy link

p2227 commented Jan 22, 2019

hi, I found that there're many unsafe lifecycle in these repo , for example

componentWillReceiveProps(nextProps: Props) {

it 's recommend using static getDerivedStateFromProps instead of componentWillReceiveProps, in order to adjust react 16.7+

@angshu
Copy link

angshu commented Feb 28, 2019

hi, relating to the above, do you plan to support 16.7+ anytime soon?

@p2227
Copy link
Author

p2227 commented Feb 28, 2019

hi, relating to the above, do you plan to support 16.7+ anytime soon?

yes

@JedWatson
Copy link
Owner

We've updated the lifecycle methods so you won't get deprecation warnings anymore, and will remove componentWillReceiveProps in v4.

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

3 participants