The documentation has this example if I want to ad...
# compose
e
The documentation has this example if I want to add a state to my component:
Copy code
var expanded by remember { mutableStateOf(false) }
Currently this gives me a compilation issue in beta2. I can write
Copy code
var expanded = remember { mutableStateOf(false) }
But that makes more painful to use. Is this something that has changed, or a bug?
a
import androidx.compose.runtime.*
if the IDE isn't offering to import
getValue
and
setValue
as quick fixes. Optimize imports from there if you want it to expand the star import.
e
Thank you both for the replies! 😍