I'm referring to the example in https://developer.android.com/jetpack/compose/state. When I code
var expanded by remember { mutableStateOf(false) }
It errors stating
Type 'TypeVariable(T)' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
The below works though
val expanded = remember { mutableStateOf(false) }
// OR
val (expanded, setExpanded) = remember { mutableStateOf(false) }