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

Fix(with-select): Rename parameter from `mapStateToProps` to `mapSelectToProps`. #10116

Merged
merged 2 commits into from Sep 24, 2018

Conversation

Projects
None yet
2 participants
@chinchang
Contributor

chinchang commented Sep 23, 2018

Description

state isn't available in this function and the current parameter name is confusing with Redux's parameter.
Moreover, in the guide it says mapSelectToProps ->
https://github.com/WordPress/gutenberg/blob/master/packages/data/README.md#withselect-mapselecttoprops-function--function
Also, discussed with @aduth
screenshot 2018-09-23 11 03 08

How has this been tested?

Ran unit tests with test-unit. All 254 tests passed.

Types of changes

  • Function parameter name change.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

chinchang and others added some commits Sep 23, 2018

Fix: with-select: Rename parameter to `mapSelectToProps`.
State isn't available here and the current parameter name
is confusing with Redux's parameter.
Moreover, in the guide it says `mapSelectToProps` ->
https://github.com/WordPress/gutenberg/blob/master/packages/data/README.md#withselect-mapselecttoprops-function--function
@aduth

aduth approved these changes Sep 24, 2018

Nice! Thanks for this.

I found a couple more instances in the test file so I updated those as well.

@aduth aduth merged commit 51f0174 into WordPress:master Sep 24, 2018

2 checks passed

codecov/project 48.81% (+<.01%) compared to 01bb2f2
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@aduth aduth added this to the 4.0 milestone Sep 24, 2018

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