In compose 1.0.0-alpha07, I am adding this line in...
# compose
l
In compose 1.0.0-alpha07, I am adding this line in my composable, but I get an error saying that I can't set up remember as a delegate:
Copy code
var boardReversed by remember { mutableStateOf(false) }

=> Type 'TypeVariable(T)' has no method 'getValue(Nothing?, KProperty<*>)' and thus it cannot serve as a delegate
Meanwhile, I just followed the documentation : https://developer.android.com/jetpack/compose/state#use-rememeber-to-create-internal-state-in-composable
s
Have you tried importing
import androidx.compose.runtime.getValue
?
👍 2
l
Oups ! I read too fast (again). Indeed the documentation states this fact. Thank you again 😃
Also, I need
import androidx.compose.runtime.setValue
s
Yeah, since you made it mutable 👍
👍 1
a
nah it’s understandable, IDE is failing to import it automatically currently
👍 1