The dev09 don't allow delegation in `state`, there...
# compose
c
The dev09 don't allow delegation in
state
, there is some special technical reason?
l
It should, but you need to additionally import the delegate functions:
Copy code
import androidx.compose.getValue
import androidx.compose.setValue
a
Alt+enter in the IDE should set you up. It moved to inline delegate functions to be compatible with the kotlin 1.4 optimizations
👌 1
c
oh, ok! now is a extension funtion
Copy code
inline operator fun <T> State<T>.getValue(thisObj: Any?, property: KProperty<*>): T = value
Thanks!
👍 1