After having recently rewired my entire application’s Redux implementation I want to find better ways and practices for using Redux. My implementation does not depend on redux for all state changes since I am not using Redux for my forms or interaction with the Ionic Storage service. Yet, dramatic simplification happened to each part of my app I do use Redux for. I am running into a few challenges as I use Redux:
- Setting up loading dialogs has been a challenge. Sometimes my loading dialogs are triggered more than once and sometimes they stay on the screen forever.
- Effects on app.component.ts always run twice for whatever reason even though I properly unsubscribe from every Rxjs Subscription.
Another area I want to improve is my navigation. Now all navigation in my app is controlled by Redux actions. The only place my app uses NavController is in my NavigationEffects class since it uses @ngrx/effects. Is that a good way to do things? The app doesn’t use any nav-params since it just has subscriptions to the store in container component.
I really like the way Redux has given my app a consistent way to manage state and would like to gain additional benefits available from other parts of the Redux ecosystem. I have learned about Thunks and Sagas and have yet to use them. Are there other things that would make my Redux implementation even better?