ngrx-domains
ngrx-domains copied to clipboard
Question on Effects and Guards ...
Greetings! This is a great addition to my toolbelt! Thank you for putting it together. I read your comment in the code stating that you left effects to be defined outside of domains. I wondered about that since if you 'registered' effects for each domain in a centralized way, the way you do for the other aspects of ngrx, then the root app module could simply iterate over the registered effect classes telling each of them to 'run'. This would prevent having to export them in the domains/index.ts file, breaking the encapsulation of the domain. Similarly, the 'registered' guards could be added to a collection to be referenced in the app module's providers section.
I think this would reduce the work needed to create and integrate a new domain into an existing app coded in this style and reduce the 'bookkeeping' needed in the main app module.
I am interested in your thoughts on this ...
I would be interested in this also. Has anyone delved into this?