sasikanth
09/13/2020, 1:52 PMremember
with mutableStateOf
as a property delegate, but I am getting this error.
Type 'TypeVariable(T)' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
Here is the usage
var selectedItem by remember { mutableStateOf(0) }
Currently I am using AS 4.2 Canary 10 with Compose Alpha 02. Am I doing something wrong or is this an issue?val selectedItem = remember { mutableStateOf(0) }
import androidx.compose.runtime.setValue
import androidx.compose.runtime.getValue
for it to work