Ngrx is nothing but flux architecture that was first originated and created by facebook dev's which was later trimmed and changed to Redux .
It's sole use is state management.
A small scenario will make its use quite clear
I am you might have used facebook right :P so if you look @ facebook's website you will see multiple components like navbar, left panel, chatbox etc. Ever wondered when a new message is delivered to you all these are updated simultaneously how ? If they went for Observables or Event Emitters they would be engulfed in a sea of spaghetti code. Which even if implemented will be very hard to debug or make changes .
Here comes the use of ngrx state management all the information is stored @ a single place and all the components are identified when the state of the data is changed .
A Look this answer from stack overflow will clear the concepts even more Image clear.
Ngrx v4 for Angular . The latest version brings some breaking changes but changes for good like featured module support in ngrx and also better payload management.
More on the same on this page.
- For Javascript Flux or Redux is one of the most prominent use case
for state management, they may be others but this is the one
supported by the community largely.
- You can implement state management in Angular using Shared services
and Observables . and in Javascript using Observables.