Lilly
06/23/2020, 1:37 PMLiveData
, Channels
, Flow
. I did some researches and if I got it right, LiveData
is prefered in ViewModel
because of it's lifecycle awareness and it runs in main thread while in data layer Flow
is preferred. But what about Channels
, where does it fit in? Or does Flow
replace Channels
in the long run?r4zzz4k
06/23/2020, 1:41 PMChannel
is nowadays just a low-level primitive for coroutines synchronization. There are still cases not covered by Flow
, but there are becoming less of them with time.Lilly
06/23/2020, 1:47 PMZach Klippenstein (he/him) [MOD]
06/23/2020, 1:49 PMr4zzz4k
06/23/2020, 1:50 PMLilly
06/23/2020, 3:02 PMLilly
06/23/2020, 3:02 PMZach Klippenstein (he/him) [MOD]
06/23/2020, 3:22 PMStateFlow
would probably be the best fit.Lilly
06/24/2020, 11:27 AM