πŸ“Š Angular
Q. What is the difference between Subject and BehaviorSubject in RxJS?
  • (A) Subject requires an initial value, BehaviorSubject does not
  • (B) BehaviorSubject stores the latest value and emits it immediately to new subscribers
  • (C) Subject stores the latest value, BehaviorSubject does not
  • (D) There is no difference
πŸ’¬ Discuss
βœ… Correct Answer: (B) BehaviorSubject stores the latest value and emits it immediately to new subscribers

Explanation: BehaviorSubject emits the last value to new subscribers, Subject does not.

Explanation by: Mr. Dubey
BehaviorSubject emits the last value to new subscribers, Subject does not.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
42
Total Visits
πŸ“½οΈ
9 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate