What is difference between BehaviorSubject and subject?

A BehaviorSubject holds one value (so we actually need to initialize a default value). When it is subscribed it emits that value immediately. A Subject on the other hand, doesn’t hold a value.

Sizin İçin Seçtik  What RxJS type is used to produce values for multiple observers?

Leave a Reply

Your email address will not be published. Required fields are marked *