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

Abstract action events from ListScreen #57

Open
dincozdemir opened this issue May 26, 2018 · 0 comments
Open

Abstract action events from ListScreen #57

dincozdemir opened this issue May 26, 2018 · 0 comments

Comments

@dincozdemir
Copy link
Member

dincozdemir commented May 26, 2018

These functions in ListScreen shouldn't be aware of the event model (type, payload). We should provide corresponding functions in the action creators.

onAdd = item => {
    this.props.pushShoppinglistEventToFirestore({
      type: SHOPPING_LIST.INCREMENT_QUANTITY,
      payload: item
    });
  };

onSubtract ...
onToggle ...
onNewItem ...
onRemoveItem ...
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

No branches or pull requests

1 participant