Is it possible to get a regular value from state and not as Observable angular Ngrx?

59 Views Asked by At

I'm wondering if I can get a regular value type from NGRX state and not an Observable?

1

There are 1 best solutions below

0
On BEST ANSWER

Since the State class extends BehaviorSubject:

export class State<T> extends BehaviorSubject<any> implements OnDestroy { ... }

I think you can get the current state by injecting State and calling state.getValue().