I have an angular 6 application and i'm using ngrx to manage state. And i noticed that an action sent that is caught by the ngrx Effects, is still going to the reducer. Am i doing something wrong or it's just normal ? Shouldn't the action stop propagating when caught by the Effects ?
0
votes
1 Answers
1
votes
Generally
Yes. More specifically all actions hit all reducers first, then the action is passed to the effects.
Find the reference here.
Proposal
I think you should have separate actions for these. Create actions which are going to trigger effects, and create actions which are going to change state in reducer.
Mixing these is not a good approach.
Check out how ngrx sample application handle these.