Açıklaması şöyle
Peki Subject neden Observable'a abone olup tekrar Observable hale getiriyor. Buradaki amaçlardan bir tanesi şuA Subject extends an Observable and implements Observer at the same time. It acts as an Observable to clients and registers to multiple events taking place in the app. It acts as an Observer by broadcasting the event to multiple subscribers.
Bir çok Subject gerçekleştirimi var. Bunlar şöyleSubjects are considered as HOT Observables.A HOT Observable, such as Subjects, emits items only once regardless of number of subscribers and its subscribers receive items only from the point of their subscription. Subjects convert cold observable into hot observable.
Hiç yorum yok:
Yorum Gönder