Why must a Fragment use viewLifecycleOwner when observing LiveData?
- A The Fragment's view is destroyed and recreated on the back stack while the Fragment itself survives
- B LiveData requires it syntactically
- C It improves performance
- D It enables data binding
Answer
The Fragment's view is destroyed and recreated on the back stack while the Fragment itself survives
Using the Fragment lifecycle instead creates duplicate observers each time the view is recreated, which is a classic bug.





