I am trying to use an instance of MutableState as a property delegate.
Here's what I have:
val countState = remember { mutableStateOf(0) }
Here's what I want:
var count by remember { mutableStateOf(0) }
However, when I use the by keyword, I get the compiler error:
Type 'TypeVariable(T)' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
What's going wrong?