-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
I'm in the process of migrating my app from ngrx 2 -> 4 and I'm having some issues with the init migration.
Previously I had:
@Effect()
init(): Observable<Action> {
return this.actions$
.ofType('@ngrx/effects/init')
.mergeMap(() => Observable.of(doSetup()));
}Which I converted, based on the migration guide, to:
@Effect()
init(): Observable<Action> {
return Observable.defer(() => Observable.of(doSetup()));
}in either case, I have another effect in the same class that's listening for the type returned by doInit:
@Effect()
onSetup(): Observable<Action> {
return this.actions$
.ofType(ActionTypes.doSetup)
.mergeMap(action => {
// contents elided
});
}and this effect is not triggered at all. The action from init is dispatched, but isn't caught by onSetup, which is causing my app to stop working :/. There are no errors logged or any other diagnostic information I'm seeing, just the action being dispatched but not caught by the effect.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels