• +91 9723535972
  • info@interviewmaterial.com

RxJS Interview Questions and Answers

Question -
What is the difference between BehaviorSubject and Observable in RxJS?



Answer -

  • Observable is a consumer/listener while a BehaviourSubject is a synchronous data source that emits data to observers.
  • Observables are stateless while BehaviourSubject is stateful.
  • Observables create a copy of the data while BehaviourSubject emits data to observers.
  • Observables are unidirectional in nature while BehaviorSubject is bi-directional in nature.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners