-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Basics: Viewmodel and State in Compose #23
Comments
Yes, you're right. I spotted it, too. Because init block in GameViewModel calls resetGame(). In this function, a new instance of GameUiState with shuffled word is created for _uiState. So, currentWordCount takes default value, 0. I'm sure this mistake will be fixed, soon. |
No, it is not fixed yet.... i just encountered the same issue while testing, and found the solution also by myself and thinking, maybe this fault is on purpose to test our understanding of the function because it is so easy to see?... :-) |
Could you please check now. |
@android-dev-lxl this has not been fixed on the Codelab it still states |
Hello @enikebraimoh, Thank you for reaching out to us. The typo is fixed: |
At the first time the app initialized,
currentWordCount
should be 0 not 1. Am I wrong?The text was updated successfully, but these errors were encountered: