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

Binding to redux improvements #3

Open
2 tasks
matiboy opened this issue Aug 10, 2017 · 1 comment
Open
2 tasks

Binding to redux improvements #3

matiboy opened this issue Aug 10, 2017 · 1 comment

Comments

@matiboy
Copy link

matiboy commented Aug 10, 2017

  • improve the mapStateToProps to avoid allowing access to the whole object: what is actually really needed in the component?
  • make use of mapDispatchToProps correctly: do not use dispatch in the props, but rather map the real actions that are needed: increment, decrement and reset
@mingsterism
Copy link

Problem 1
in logs, state in mapStateToProps is
counter.js mapStateToProps --------- {counterReducer: {…}}counterReducer: counter: 0__proto__: Object__proto__: Object
what is really needed is just counter, not counter2.

Problem 2
Not enough time. Will look over weekend.

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

2 participants