-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[x] Support request
Hello, After updating the module @ngrx from version 2 to 4 the actions inside effects of my application are processed in a different order and I believe this is due to the changes made to close the issue #43 (reported as a bug). consider this code:
@Effect()
rootEffect$: Observable = this.actions$
.ofType(system.ActionTypes.ROOT)
.map((action: RootAction) => action.payload)
.switchMap(data => {
return Observable.concat(
of(new ActionA()),
of(new ActionB()),
of(new ActionC())
);
});
@Effect()
childEffects$: Observable = this.actions$
.ofType(system.ActionTypes.ACTION_A)
.switchMap(data => {
return Observable.concat(
of(new ActionA1()),
of(new ActionA2()),
of(new ActionA3())
);
});
Before the upgrade i got the sequence ACTION_A, ACTION_A1, ACTION_A2, ACTION_A3, ACTION_B, ACTION_C (children before root) as a consequence of processing action RootAction
After the upgrade the resulting order is: ACTION_A, ACTION_B, ACTION_C, ACTION_A1, ACTION_A2, ACTION_A3 (root before children). Is this behavior the correct one?
As the first sequence is the one that works in my application, do I have to remove action nesting inside effect in order to restore it?
Thank you.
Reactions are currently unavailable