- Similar to a
PublishSubjectexcept, it will replay the latest
.nextevent to new subscribers.
- Needs a initial value upon creation - If you can’t think of one use a PublishSubject
- Starts with an initial value and replays it or the latest element to new subscribers.
- Useful when you want to repopulate a view with the most recent data.
let subject = BehaviorSubject<String>(value: "8 in a row!")
< All Posts