NgRx overview
NgRx consists of the following parts:
@ngrx/store
: This is the core that contains a way for us to maintain state and dispatch actions.@ngrx/effects
: This will handle side effects such as, AJAX requests, for example.@ngrx/router-store
: This ensures we can integrate NgRx with the Angular routing.@ngrx/store-devtools
: This will install a tool that gives us the opportunity to debug NgRx by, for example, giving us a time travel debugging functionality.@ngrx/entity
: This is a library that helps us manage record collections.@ngrx/schematics
: This is a scaffolder library that helps you when using NgRx.
A word on state management
Some components must have state. When there is a need for another component to know about that very same state, the first component needs to find a way to communicate that to the other component. There are many ways to achieve this. One way is to ensure that all state that should be shared lives in a centralized store. Think of this store as a single source of...