It might be a dumb question, but as I’m at my very...
# compose
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 🙏