Skip to content

Commit ab21b83

Browse files
committed
Fixed Typo & BehaviorSubject's description in Subjects Playground
Note - BehaviorSubject still also needs a description (seems to be copy pasted from ReplaySubject)
1 parent f978d02 commit ab21b83

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Playgrounds/Subjects.playground/Contents.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,9 @@ example("ReplaySubject") {
5555

5656
## BehaviorSubject a.k.a. Variable
5757

58-
ReplaySubject emits to any observer all of the items, in the buffer, that were emitted by the source
59-
58+
BehaviorSubject is similar to ReplaySubject except it only remembers the last item. This means that all subscribers will receive a value immediately (unless it is already completed).
6059
*/
61-
example("ReplaySubject") {
60+
example("BehaviorSubject") {
6261
let subject = BehaviorSubject(value: "z")
6362
writeSequenceToConsole("1", subject)
6463
sendNext(subject, "a")

0 commit comments

Comments
 (0)