-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Feat/drop componentWillReceiveProps #1030
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
Conversation
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.
Am I right that this will not work in React 15?
}); | ||
if (prevState.prevCode !== code) { | ||
return { | ||
...prevState, |
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.
You don't need this line, it will merge new state with the previous for you.
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.
@sapegin yes, you're right. Thanks
And thanks again! 🦄 |
Codecov Report
|
@sapegin added polyfill for support react < 16.4 |
That's awesome! Thanks! |
🎉 This PR is included in version 7.0.20 🎉 The release is available on: Your semantic-release bot 📦🚀 |
In 7.8.0 eslint-plugin-react release added warning for componentWillRecieveProps jsx-eslint/eslint-plugin-react#1750
After update package-lock and reinstall dependencies linter crashes with error.
This pull migrate componentWillRecieveProps to new react lifecicle method getDerivedStateFromProps