What is the difference between BehaviorSubject and Subject?
- A BehaviorSubject holds a current value and emits it immediately to new subscribers
- B Subject holds a current value
- C BehaviorSubject cannot emit new values
- D They are identical
Answer
BehaviorSubject holds a current value and emits it immediately to new subscribers
BehaviorSubject requires an initial value and is the usual choice for shared state in a service, since late subscribers receive the current value.





