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

Redux state across branches (tougher #2) #6

Open
matiboy opened this issue Aug 10, 2017 · 2 comments
Open

Redux state across branches (tougher #2) #6

matiboy opened this issue Aug 10, 2017 · 2 comments

Comments

@matiboy
Copy link

matiboy commented Aug 10, 2017

Assuming the state between counter and step are on different branches, meaning e.g.

{
  counter: {
    counter: 1
  },
  step: {
    step: 1
  }
}

and so the increment/decrement methods do not have direct access to the "step" state. Propose various solutions, at the component, actions and state structure, to solve the problem of dependent states across state branches.

@mingsterism
Copy link

Not too sure what does " do not have direct access to the step state" mean. Will need to figure it out.

@matiboy
Copy link
Author

matiboy commented Aug 11, 2017

In your reducer function for counterReducer, you only have access to the "counter" part of the state. You can't directly access the "step" part

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