DEV Community

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

matiasdelbel profile image
Mati Del Bel

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

enyason profile image
Enya Emmanuel Author

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.