BehaviorSubject also has a value property — that IMO should never be used — and it’s concept of an initial value is a little different to a buffer with a size of one.

ReplaySubject can also be constructed with a windowTime (in milliseconds) instead of (or in addition to) a bufferSize.

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