Skip to content

Conversation

@binh-dam-ibigroup
Copy link
Collaborator

This P demonstrates a way to encapsulate the common code to connect styled LocationField instances to the redux store.
@landonreed let me know what you think of this approach.

Copy link
Member

@landonreed landonreed left a comment

Choose a reason for hiding this comment

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

Looks good. Just a couple of tweaks in #285

userLocationsAndRecentPlaces: [...user.locations, ...user.recentPlaces]
}
// Leave stateToProps.location completely unset unless includeLocation is true.
if (includeLocation) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@landonreed It is still necessary to leave the location prop unset, otherwise the IntermediatePlaceField and FavoriteLocation components will use the fixed null value as location.

Copy link
Member

Choose a reason for hiding this comment

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

Ah gotcha, thanks for the info. Could you include that in the comment above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, updated in cae2ba7.

Copy link
Member

@landonreed landonreed left a comment

Choose a reason for hiding this comment

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

Looks great, just one comment about updating that comment re includeLocation.

@binh-dam-ibigroup binh-dam-ibigroup merged commit c3405b4 into improve-save-user-locations Dec 10, 2020
@binh-dam-ibigroup binh-dam-ibigroup deleted the connect-location-field branch December 10, 2020 14:42
@evansiroky evansiroky mentioned this pull request Mar 31, 2021
@github-actions
Copy link
Contributor

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants