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

new rule: mapDispatchToProps-consistent-dispatch #24

Open
DianaSuvorova opened this issue Mar 26, 2018 · 0 comments
Open

new rule: mapDispatchToProps-consistent-dispatch #24

DianaSuvorova opened this issue Mar 26, 2018 · 0 comments

Comments

@DianaSuvorova
Copy link
Owner

mapDispatchToProps-consistent-dispatch
This rule would warn the following case:

const mapDispatchToProps = dispatch => ({
  onDoSomething: () => dispatch(toSomethingElse()),
  action1: action1
});

while below two are correct:

const mapDispatchToProps = dispatch => ({
  onDoSomething: () => dispatch(toSomethingElse()),
  action1: () => dispatch(action1())
});
const mapDispatchToProps = {
  onDoSomething: doSomethingElse
  action1,
});

as per discussion #10

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

No branches or pull requests

1 participant