Angular + NGRX Architecture: When To Use Component State Vs NGRX State
How do you decide when a piece of information should go in your NGRX store, as opposed to being maintained as local component variables?
How do you decide when a piece of information should go in your NGRX store, as opposed to being maintained as local component variables?
It’s easy to mock up emissions from your NGRX store over time in your unit tests, but the manner in which you do so is not immediately obvious from reading the NGRX testing documentation. In this post I’ll explain my thought process in how I solved this problem in the hopes that it helps others.