Created
April 27, 2020 23:18
-
-
Save masliukivskyi/8d9057db1542191dde5fb358218fcb38 to your computer and use it in GitHub Desktop.
Basics of Combine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let subject = CurrentValueSubject<String, Never>("This text should not be received") | |
subject.send("π") | |
subject.sink { (value) in | |
print("Received value: \(value)") | |
} | |
subject.send("πΆβ) | |
Output: | |
Received value: π | |
Received value: πΆ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment