Redux principles

Redux follows three basic principles:

  • The whole state of the application is stored in a single immutable state tree called store. No state management is allowed outside the store. A central immutable store has a lot of benefits. You can improve the performance by using ChangeDetectionStrategy.OnPush because with immutable data, Angular only needs to check object references to detect changes. Furthermore, the undo/redo functionality is easy done.
  • Actions are used to send information from the application to the store. Only actions are source of information for the store. Actions are plain JavaScript objects having type and payload properties. The type property describes a kind of state change we want. The payload property ...

Get Angular UI Development with PrimeNG now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.