Please change the example.
Care to ellaborate?
Probably referring to https://blog.nrwl.io/using-ngrx-4-to-manage-state-in-angular-applications-64e7a1f84b7b
Router as the Source of Truth
There are many ways to approach the synchronization of the @ngrx/Store and the router. One way is to build a generic library synchronizing the store with the router. It won鈥檛 solve all of the problems, but at least the synchronization won鈥檛 be ad-hoc. Another way is to make navigation part of updating the store. And finally we can make updating the store part of navigation. Which one should we pick?
The example app uses the router as a single source of truth for navigation already with router-store. Closing as non-actionable
ok, so in this example you use router in the container component. Now, this container component only purpose is to make router a single point of truth. I think the whole idea of making a component as a link between app and router is not right. I like the nrwl approach better - it's just an effect and there you just dispatch appropriate action.
Components are for different purposes, well, to me.
I acknowledge that I can be wrong here. So, just IMHO.
Most helpful comment
ok, so in this example you use router in the container component. Now, this container component only purpose is to make router a single point of truth. I think the whole idea of making a component as a link between app and router is not right. I like the nrwl approach better - it's just an effect and there you just dispatch appropriate action.
Components are for different purposes, well, to me.
I acknowledge that I can be wrong here. So, just IMHO.