google-developer-training / basic-android-kotlin-compose-training-unscramble

Apache License 2.0
98 stars 140 forks source link

Android Basics: Viewmodel and State with Compose #167

Open alghe-global opened 10 months ago

alghe-global commented 10 months ago
To get the correct player word, use the getUnscrambledWord() function, which takes in the currentGameUiState.currentScrambledWord word and returns the unscrambled word. Store this returned value in a new read-only variable named unScrambledWord and assign the value returned by the getUnscrambledWord() function.

variable used in the code example is correctPlayerWord instead of unScrambledWord

you folks should be more careful when using generative ai when creating lessons

alghe-global commented 10 months ago

this is in https://developer.android.com/codelabs/basic-android-kotlin-compose-test-viewmodel?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-4-pathway-1%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-test-viewmodel#3

alghe-global commented 10 months ago

also, the variable is not read-only