Cody Engel10/24/2019, 5:00 AM
But inheritance isn’t currently supported for Model objects. We currently use LiveData a lot today but with Compose it seems like unnecessary overhead.
@Model class Name(var name: String = "Android") : ViewModel()
themishkun10/24/2019, 6:27 AM
tries to do to register observables. Do you really want that? Just use composition over inheritance and smack that
as a property of your ViewModel. But before that, try to think: do you even need a ViewModel in the first place?
Luca Nicoletti10/24/2019, 7:42 AM
George Mount10/24/2019, 2:55 PM
Cody Engel10/24/2019, 3:27 PM
Chuck Jazdzewski [G]10/24/2019, 5:07 PM
classes is in the plan but is not currently supported.
Luca Nicoletti10/24/2019, 5:08 PM
Chuck Jazdzewski [G]10/24/2019, 5:10 PM
lowering transform to support inheritance. The state record needs to inherit from the ancestor state record which is admittedly not that difficult to implement but I have not gotten to it yet.
Cody Engel10/24/2019, 5:44 PM
themishkun10/24/2019, 9:45 PM
Cody Engel10/24/2019, 9:58 PM
themishkun10/25/2019, 5:46 AM