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 ...