Rxswift: Allow BehaviorSubject without initial value

Created on 16 Dec 2016  路  3Comments  路  Source: ReactiveX/RxSwift

In some cases it is convenient to initialize an empty BehaviorSubject without an initial value.

Most helpful comment

Hi @hannesstruss ,

then you want ReplaySubject.create ....

All 3 comments

Hi @hannesstruss ,

then you want ReplaySubject.create ....

Indeed. Thanks!

Don't forget to set the buffer size to 1 if you want exactly a BehaviorSubject minus the initial value piece.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeremiegirault picture jeremiegirault  路  3Comments

acecilia picture acecilia  路  3Comments

angerman picture angerman  路  3Comments

gaudecker picture gaudecker  路  3Comments

RafaelPlantard picture RafaelPlantard  路  3Comments