Created
June 18, 2019 09:01
-
-
Save bpisano/46840c7b706b9f0cd51529c991c7f48b to your computer and use it in GitHub Desktop.
Embedded code in my Weather article on Medium
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
| import SwiftUI | |
| import Combine | |
| class CityStore: BindableObject { | |
| let didChange = PassthroughSubject<CityStore, Never>() | |
| var cities: [City] = [City(name: "Chambery")] { | |
| didSet { | |
| didChange.send(self) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment