-
Notifications
You must be signed in to change notification settings - Fork 311
Ngrx/store/init is Fired Twice #280
Comments
I'm not really following the actual development of this, just trying to use it in my own project. And now that I know there is a "probe" event being fired as one of the "inits" I feel better about it so you can close this issue when it's fixed or when ever you feel like it. thanks |
I have the same issue Any help is welcome |
If it's on a lazy loaded module, it could be related to router bug |
not sure about the reason, but I worked around by moving my data module which is responsible for the state stuff to the root and loaded it directly in the app module instead of loading it in a my shared module. |
hey @spali, I have the same issue, init functions being called multiple times but I am already loading them in my app.module. Could you please share some more info on your solution? |
Try loading the store module just in the bootstrapping module. This worked for me. |
Probably related: angular/angular#12869 |
@paishin If you are using lazy modules thats definitely it. Either get rid of them, or downgrade, as describd in angular/angular#12869. Init event fires twice by design. If it fires 4 times or more, then you have a problem. |
The init event shouldn't fire twice even under normal circumstances. You should only provide store in your root AppModule's imports. If you're seeing it twice than that's a separate issue |
Hi, |
This should be resolved in the latest angular4, or use older router angular/angular#12869 |
Please check this against NgRx v4, and if it’s still an issue, please reopen on https://github.com/ngrx/platform. Thanks! |
This seems like a bug to me...
I have created a simple reducer which logs out the action that comes in:
But when I test this is chrome I get the "init" action firing twice. Is there any good reason for firing it twice?
The text was updated successfully, but these errors were encountered: