NgRx effect or reducer – order of execution

By | 22 September 2021

One of the questions from the interview: what is first executed if you use the same action for reducer and effect? Do you know the answer?

If you look at the diagram on NgRx site https://ngrx.io/guide/store#diagram, it isn’t clearly visible. We can base 0n the answer of one of the NgRx core team members, we know that the effects are only performed after all reducers https://github.com/ngrx/platform/issues/162

To check it, you can download the repo https://github.com/tomaszplawecki/reducer-effect-what-first in which the basic store is created. You can test the store using breakpoints in the developer’s console.

Leave a Reply

Your email address will not be published. Required fields are marked *