DEV Community

Discussion on: Simple yet powerful state management in Angular with RxJS

Collapse
 
spierala profile image
Florian Spier

I think the reload thing is not really a state, therefore I would not make it part of the state interface. It is more like an action. You can easily create an Action with an RxJS Subject and subscribe on it to trigger the API Call.
You can add that Subject to the service which extends the StateService.

Collapse
 
brotherm profile image
MichaelC

Excellent suggestion! Thank you.