Feeling a little lost on what to use for a Map of data that's manipulated in a non-compose module but reflected in the UI.
SnapshotStateMap
seems like the ideal way to expose it to the UI, but I can't use that in my non-compose module.
StateFlow<Map<T, V>>
seems like the only option, but that emits the entire map on each change, rather than only what changed about it.
Any other better options? I could make a
SnapshotStateMap
observe the
StateFlow
but that's kinda gross, right?
k
Kirill Grouchnikov
04/05/2022, 4:27 PM
Might be better suited for #compose unless there's something in here that is desktop specific
d
David W
04/05/2022, 4:27 PM
Another time I asked a question about Compose that wasn't desktop specific I was told to ask here because "the apis are different" or something 😄
David W
04/05/2022, 4:28 PM
That one was graphics-related
David W
04/05/2022, 4:28 PM
but also, Android-only solutions would not work for me, and are much more likely to be offered in #compose
David W
04/05/2022, 4:29 PM
as it is the de facto android compose channel
k
Kirill Grouchnikov
04/06/2022, 3:33 PM
I still think that you'd get more traction in that channel, perhaps with framing the question to be platform-agnostic to steer people away from Android-specific answers.