BehaviorSubject vs PublishSubject

The main difference between PublishSubject and BehaviorSubject is that the latter one remembers the last emitted item. Because of that BehaviorSubject is really useful when you want to emit states

Why they make project field a BehaviorSubject and not PublishSubject ?

Probably because they want to be able to retrieve the last emitted project with this method:

@Override public @NonNull Observable<Project> project() {
  return this.project;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)