-
-
Save basilche/9443ef72995f2cee9377c087e87096f7 to your computer and use it in GitHub Desktop.
This file contains 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
@Published var title: String = "" | |
//And then you can change the variable itself: | |
title = "Bob" | |
//And also to track its changes: | |
let titleSubscription = $title.sink { | |
print("new title is '\($0)'") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment