To avoid exposing the MutableLiveData from ViewModel, there's a pattern to avoid only exposing the LiveData object instead. My question is, what's the difference between both approaches?
Attributing directly:
private val _value = MutableLiveData<Any>()
val value: LiveData<Any> = _value
Using the get()
private val _value = MutableLiveData<Any>()
val value: LiveData<Any>
get() = _value