-
Notifications
You must be signed in to change notification settings - Fork 72
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
Change componentWillReceiveProps to getDerivedStateFromProps #105
Change componentWillReceiveProps to getDerivedStateFromProps #105
Conversation
Thanks @Karl-EdwardFPJeanMehu , we'll take a look at it soon! |
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 have found two more UNSAFE methods in ContectMap.js component - there are multiple components within this file.
** There is also a feature in the contact page (~/contacts) that scrolls to map focus on location if you click on one of the addresses, which is currently broken by your changes.
Overall fix is great, it is similar as it is described in https://hackernoon.com/replacing-componentwillreceiveprops-with-getderivedstatefromprops-c3956f7ce607.
@@ -38,7 +38,7 @@ export class MapContainer extends Component { | |||
} | |||
|
|||
//TODO: Method will be removed in React 17, will need to be rewritten if still required. |
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.
Clould you please remove this comment line.
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.
Sure!
@Karl-EdwardFPJeanMehu - if you need any help or advice, just feel free to ask! |
Hello @Karl-EdwardFPJeanMehu, due to inactivity, I have decided to merge your pull request and revert changes in ContactMap component right after the merge. I will close the issue and create a new one for refactoring ContactMap component. Thanks for your contribution! |
we would like to thank you for contributing to Kentico's open-source project. As a sign of our appreciation, we would like to send you some Kentico Developer Community SWAG! Please fill out your postal address if you are interested. This comment was automatically generated. If you've submitted more than one pull request, it's OK to fill out the form just once. Kentico Developer Community If there’s anything we can do to help, please don’t hesitate to reach out to us at developerscommunity@kentico.com |
Fix for issue #97 UNSAFE_componentWillReceiveProps