Last active
November 20, 2020 04:45
-
-
Save brunomunizaf/a7f7e7d86f95f627e47ebe4ccd0aabe6 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
final class ViewModel { | |
let countBox: Box<Int> = Box(0) | |
@objc func increment() { | |
countBox.value += 1 | |
} | |
@objc func decrement() { | |
countBox.value -= 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment