© Fu Cheng 2018
Fu ChengBuild Mobile Apps with Ionic 4 and Firebasehttps://doi.org/10.1007/978-1-4842-3775-5_6

6. State Management with NgRx

Fu Cheng1 
(1)
Sandringham, Auckland, New Zealand
 

When implementing the user story to list top stories in the last chapter, the actual data is stored in RxJS observables. Although the implementation in the ItemService is very concise, it’s not very easy to understand, especially the usage of different RxJS operators. The combination of RxJS operators can be very complicated, which makes the debugging and testing very hard. It’s better to use explicit state management in the app. We’ll use NgRx for state management.

The Importance of State Management

You may wonder why the concept of state management is introduced ...

Get Build Mobile Apps with Ionic 4 and Firebase: Hybrid Mobile App Development 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.