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

Nice work on your reducers #32

Open
trentgoing opened this issue Oct 20, 2020 · 0 comments
Open

Nice work on your reducers #32

trentgoing opened this issue Oct 20, 2020 · 0 comments

Comments

@trentgoing
Copy link

case 'CHANGE_CURRENT_IMAGES':

In thinking about what reducers map to what values in state, right now your reducers very much have a 1 to 1 pattern of each reducer anticipating one action to be dispatched. However, consider how a given action could result in multiple values being updated in your store. For example, if you change the selected style, you should probably be updating both the selected image and the selected images at the same time. Think about whether you could refactor your reducers so that only a single action would be dispatched, but many reducers could consume it and update the store appropriately.

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