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

Change componentWillReceiveProps to getDerivedStateFromProps #105

Merged
merged 4 commits into from
Oct 24, 2018
Merged

Change componentWillReceiveProps to getDerivedStateFromProps #105

merged 4 commits into from
Oct 24, 2018

Conversation

Karl-EdwardFPJeanMehu
Copy link
Contributor

Fix for issue #97 UNSAFE_componentWillReceiveProps

@petrsvihlik
Copy link
Contributor

Thanks @Karl-EdwardFPJeanMehu , we'll take a look at it soon!

Copy link
Contributor

@Simply007 Simply007 left a 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.
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

@Simply007
Copy link
Contributor

@Karl-EdwardFPJeanMehu - if you need any help or advice, just feel free to ask!

@Simply007
Copy link
Contributor

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!

@Simply007
Copy link
Contributor

Hey @Karl-EdwardFPJeanMehu,

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

@Karl-EdwardFPJeanMehu Karl-EdwardFPJeanMehu deleted the deprecated_lifecycle branch November 25, 2018 14:54
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.

None yet

3 participants