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

Discuss: Reducer / Action Reuse #110

Closed
Renader opened this issue Jul 19, 2017 · 0 comments
Closed

Discuss: Reducer / Action Reuse #110

Renader opened this issue Jul 19, 2017 · 0 comments

Comments

@Renader
Copy link

Renader commented Jul 19, 2017

In my opinion ngrx/store performs poor in regards to reusability. Recently I opened an issue in ngrx/store and got the advice to add a scope string field to my action in order to re-use my reducer. That works but has its drawbacks.

I guess a lot of issues can be resolved (especially effect reuse through extending .ofType() and so on with it) trough adding a scope?: string; field to the {Action} from '@ngrx/store';

Also i think ngrx/store should promote one way of doing it. E.g. should an action have a scope that you pass in when you call the action or should there be a single action for each re-used slice of your state?

Also how should effects be re-used? Afaik the @Effect annotation doesn't work in abstract classes yet.

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