Home
Practices - Do you know to use ngrx on complex applications?
  v7.0 Posted at 26/10/2018 10:51 AM by Tiago Araujo
State management is complex and time-consuming.
On large applications, it becomes very difficult to maintain state. The redux pattern helps resolve this issue.
​​

ngrx is the redux pattern implemented for Angular . View on GitHub.

ngrx.png
Figure: ngrx supercharges the redux pattern with RxJS

Benefits:

  • Easy state management
  • Better tooling and debugging
  • Simpler applications to build
  • Increased performance
  • Code that is easy to test
img1.png
Figure: ngrx supercharges the redux pattern with RxJS
img2.png
Figure: The redux pattern is a way to implement a predictable state container

The three principles of the redux pattern:

  1. The entire state of the application is represented in a single JavaScript object called a store.
  2. The store is acted upon using special functions called reducers. 
  3. State is immutable and reducers are the only part of the application that can change state.

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address:

    Comments: