I am currently building an Angular application where I make a request to an api, and I map the repsonse to two different arrays. I can use this data in my app.components.t
The simple way to go about this, would be to use BehaviorSubject
. The documentation on this is comprehensive, I'm sure you can find it.
To handle complex state in large applications, people use Redux. For Angular, there is NgRx.
If updating state requires you to call an API as a side effect, use ngrx/effects
https://ngrx.io/guide/effects