Great post, you have a nice introduction to what NgRx is and the various parts of the framework. Have you had to add NgRx to larger real world application? It’ll be interesting to hear what you found out, if you have.
I’m currently working on a few older Angular applications which aren’t using NgRx, and a new one that is. I’d love to convert the older apps to using NgRx, just for the structure it gives the code for one thing (especially as the app has been worked on by serveral different developers who all seem to have different approaches to writing Angular).
Anyway, it’ll be interesting to hear your thoughts on adding NgRx to an existing larger Angular app.
as always I would say: It depends
I would ask myself following questions:
- Is there already a problem with inconsistent view states?
- Is the code hard to maintain already?
- Is enough time to do it?
I would only do it if at least two question are answered with YES
The migration itself should be done step by step, so that we can learn form our mistakes.
From a technical viewpoint I see no problem in doing that.
Of course having tests which guarantees that everything works as expected after the changes would be great as well.