DEV Community

Discussion on: How to set up a Base Fragment Class with ViewBinding and ViewModel on Android

Collapse
 
matiasdelbel profile image
Mati Del Bel

Hey! Nice article! One thing, shouldn't you clear the binding instance on onDestroyView?

Collapse
 
enyason profile image
Enya Emmanuel

Yeah Mati. I did not take that into consideration because I was only trying to demonstrate the use of base fragment. However, for the sake of best practices, I will update the code accordingly. Thanks.