google-developer-training / basic-android-kotlin-compose-training-tip-calculator

Apache License 2.0
61 stars 97 forks source link

Intro to state in Compose: Android Basics with Compose #216

Open Mallikarjuna00G opened 4 months ago

Mallikarjuna00G commented 4 months ago

URL of codelab Intro to state in Compose

In which task and step of the codelab can this issue be found? Use remember function to save state

Describe the problem In above mentioned step of codelab, within the "note:" block, second paragraph is stated as below.

When the user enters text into the text field, the onValueChange lambda callback is called, the lambda executes, and the amountInput.value is set to the updated value entered in the text field.

But, by the time the discussion reached this note section, the type of the amountInput variable is changed from mutableStateOf to remember. At least that is my understanding. Therefore, from my understanding I believe that amountInput should be used instead of amountInput.value. And also android studio threw error Unresolved reference: value.