What is a Subject?

Updated May 6, 2026

Short answer

A Subject is both an Observable and Observer.

Deep explanation

It allows multicasting values to multiple subscribers.

Real-world example

Event buses in applications.

Common mistakes

  • Using Subject unnecessarily instead of Observable.

Follow-up questions

  • What is BehaviorSubject?
  • What is ReplaySubject?

More Reactive Programming interview questions

View all →