-
Notifications
You must be signed in to change notification settings - Fork 179
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
Remove call to componentWillReceiveProps #164
Remove call to componentWillReceiveProps #164
Conversation
if (id !== this.props.id) { | ||
this.setState({ inputId: id || generateId() }); | ||
this.setState({ inputId: this.props.id || generateId() }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More correct to use getDerivedStateFromProps
for update state based on props
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performance difference is despicable. Can't we move ahead and approve the PR? Using this deprecated event is much worse than this detail
any updates on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine. What is requested to be changed is just a detail
Any updates on this? |
I've made a fork with the fix for this released as |
Created an alternative PR that uses |
Issue #163, see https://fb.me/react-async-component-lifecycle-hooks