https://kotlinlang.org logo
Title
c

Colton Idle

07/17/2020, 2:05 AM
Trying to reason about architecture,,, and even though I realize that fragments aren't the best thing out there, and AAC ViewModels aren't the best thing either... I think for a majority projects, there are a ton of benefits to just using what is provided to us from google. Knowing this I'm using a single LiveData to send my UiState to my View/Fragment and I observe the single state. This works really nicely in my opinion... what I still don't know how to do is how to send events from ViewModel to the Fragment via some kind of observable for Events. It seems like this library would be good enough for 98% of cases no? https://github.com/hadilq/LiveEvent
l

Loboda Deni

07/17/2020, 3:03 AM
I use SingleLiveEvent for single events