Christopher Porto
07/31/2022, 7:00 AMmutableStateOf
and inside the object I have string property. Im trying to use that string property for TextField
but when I type in it, it doesn't change the text value in UI. Whats the proper way of doing this? Thanks
In parent class I have
var config by mutableStateOf(SomeConfig(""))
and then I call it like this
TextField(config.token, onValueChange = {
config.token = it
})
Ruckus
07/31/2022, 3:04 PMSomeConfig
needs to be immutable, or it shouldn't be a state while token
should be.Landry Norris
08/01/2022, 2:01 PMconfig = config.copy(token = it)
assuming SomeConfig is a data classAbdelilah El Aissaoui
08/02/2022, 5:16 PMremember {}
blockChristopher Porto
08/10/2022, 7:23 PMSomeConfig
a mutable state one by one), I was just under the assumption that wrapping the object itself will automatically apply to any changes for its properties