Gabor Varadi
1 min readMay 28, 2019

--

I’d just ditch the single-object state (which seems to contain both state AND data!), and use multiple LiveData (or BehaviorRelay). If you really REALLY want to make your life harder and keep the single-object, you can use databinding which will only re-render the view if there actually was a change in the bound property. If you keep multiple LiveData though, then you won’t have the error state overwrite your exposed data.

--

--

Gabor Varadi
Gabor Varadi

Written by Gabor Varadi

Android dev. Zhuinden, or EpicPandaForce @ SO. Extension function fan #Kotlin, dislikes multiple Activities/Fragment backstack.

Responses (1)