Aman
Aman

Reputation: 33

Does NgRx store's select operator return a behavioursubject?

Whenever we subscribe to this.store.select(''), we immediately get the current state of the store slice. Since, even though no value was emitted for sometime when this subscription happened, can we conclude that select is a behaviourSubject?

Upvotes: 0

Views: 412

Answers (1)

timdeschryver
timdeschryver

Reputation: 15525

this.store.select('') is a Observable. State is a BehaviorSubject though, that's why you get the current state.

Upvotes: 2

Related Questions