DEV Community

Discussion on: NgRx — Best Practices for Enterprise Angular Applications

 
wesgrimes profile image
Wes

Great idea. I always try to recreate things in isolated mini repos.

Thread Thread
 
dlucazeau profile image
Daniel Lucazeau

I have forked your project and added a second feature store: hoax ;-)
joke-store/effects can only return action of type koke-actions/actions. So I have imported the main hoax actions and that is running, even if the list of jokes is not proposed.

This is not practical nor clean because I will have about 10-12 main features in the menu after login (AUTH).
With this technique, I need to import all the initial actions of all features into all feature actions. 12 * 12 imports ...

English is not my mother language, I hopeyou understand my explainations.

You can see my changes in github.com/dlucazeau/angular-ngrx-...

I will continue to research this important aspect for our application.

Thread Thread
 
dlucazeau profile image
Daniel Lucazeau

I will go from one menu / item to another directly with the router. And the first step after that will be to activate the feature store. It works well.
As we must be able to install this on-site application with all or only a few features, this architecture will be suitable.

I will study the lazzy loading of the stores.

Your tutorial was a good introduction to solve my problem.

Thread Thread
 
wesgrimes profile image
Wes

I plan on updating my article soon to accommodate for lazy loading feature stores, I will also address dispatching actions between feature stores

Thread Thread
 
dlucazeau profile image
Daniel Lucazeau • Edited

I will monitor and read the news carefully.

Lazy loading is easy, we have just to move the featureModules from AppModule in their corresponding module.
In DevRedux we can see a new line with 'update-reducers'

Thread Thread
 
wesgrimes profile image
Wes

Agreed.