Subject is a pretty fundamental class, in the RxJS implementation. Shoving the notion of an initial value into to along with an accessor for that value (which might or might not exist) — to replicate the functionality of BehaviorSubject — along with the notion of a (potentially time-based buffer) — to replicate the functionality of ReplaySubject — would only make the Subject implementation larger and slower.

RxJS core team member; front-end developer; mentor; speaker; open-source contributor

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store