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

Inline simple selectors used in mapStateToProps #4736

Closed
whymarrh opened this issue Jul 5, 2018 · 1 comment
Closed

Inline simple selectors used in mapStateToProps #4736

whymarrh opened this issue Jul 5, 2018 · 1 comment
Labels
area-UI Relating to the user interface.

Comments

@whymarrh
Copy link
Contributor

whymarrh commented Jul 5, 2018

As per a discussion with @alextsg and @danjm:

Selectors should be used to abstract "complex" state queries. "Simple" selectors, selectors that simply pull a property from state without any logic, should be inlined into the mapStateToProps function. This is the case for new components (e.g. #4691) and we will need to adjust recently refactored components to fit this style.

Going forward we can (separately) introduce tooling (a custom lint?) to ensure that no logic is put inside mapStateToProps.

@whymarrh whymarrh added the area-UI Relating to the user interface. label Jul 5, 2018
@whymarrh
Copy link
Contributor Author

This isn't an important change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-UI Relating to the user interface.
Projects
None yet
Development

No branches or pull requests

1 participant