Question du test Initiation à RxJS

Expliquez la différence entre un ReplaySubject et un BehaviorSubject en RxJS

Difficile

Quelle est la différence entre un ReplaySubject et un BehaviorSubject ?

Auteur: Amine BouchamStatut : PubliéeQuestion passée 98 fois
Modifier
0
Évaluations de la communauté
developer avatar
Auteur anonyme
03/09/2024
i've answered second and third checkboxes and i'm not sure how it is Partially correct, BehaviorSubject has to have an initial value and ReplaySubject does not emit only once it's full
developer avatar
Auteur anonyme
06/09/2024
The first answer about the ReplayBuffer is left unchecked by most people but should be checked.
developer avatar
Auteur anonyme
06/09/2024
because it's not correct, ReplaySubject doesn't emit only when it's full, if its size is 6 and it received only 3 values then it's been subscribed to it will emit the 3 values, it will not wait till it has 6 values, not sure if i misunderstood the question!