Skip to content

Instantly share code, notes, and snippets.

@masliukivskyi
Created April 27, 2020 23:17
Show Gist options
  • Save masliukivskyi/bad82a9bb9a0991385888d6b2fe571fa to your computer and use it in GitHub Desktop.
Save masliukivskyi/bad82a9bb9a0991385888d6b2fe571fa to your computer and use it in GitHub Desktop.
Basics of Combine
let subject = PassthroughSubject<String, Never>()
subject.send("๐Ÿ˜‰")
subject.sink { (value) in
print("Received value: \(value)")
}
subject.send("๐Ÿถโ€)
Output:
Received value: ๐Ÿถ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment