Hi, is this a bad practice:
I've implemented MutableStateFlow delegates like this
inline operator fun <T> StateFlow<T>.getValue(thisObj: Any?, property: KProperty<*>): T = value
inline operator fun <T> MutableStateFlow<T>.setValue(thisObj: Any?, property: KProperty<*>, value: T) {
this.value = value
}
And I use the variable like this:
var state by MutableStateFlow("foo")
On compose side:
val state = viewModel.state
I know I cannot call
collectAsStateWithLifecycle
here. But what difference does it make here?