It might be a dumb question, but as Iโ€™m at my very beginning with Compose and cannot find an answer....
d
It might be a dumb question, but as Iโ€™m at my very beginning with Compose and cannot find an answer. Given I want to have something like
Text(text = myCustomText)
, where
myCustomText: Flow<String>
, what is the cleanest way to deal with that?
v
Compose comes with a
collectAsState
extension function to convert a
Flow
to a
MutableState
d
Awesome! Thank you! ๐Ÿ™‚
๐Ÿ‘๐Ÿผ 1
Am I missing something?
j
there's issue I believe with auto importing those.....you might need to manually add imports e.g.
Copy code
import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue
โž• 1
d
Ouch, thatโ€™s a tricky one ๐Ÿ˜› Thank you again ๐Ÿ™