0

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

Shira
  • 89
  • 2
  • 2
  • 7

1 Answers1

0

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().

Andrei Gătej
  • 11,116
  • 1
  • 14
  • 31