For a fragment, what's the difference, if any, bet...
# android
k
For a fragment, what's the difference, if any, between fragment.lifecycleScope.launch() and fragment.viewLifecycleOwner.lifecycleScope.launch() ?
s
The view of a fragment usually has a shorter lifecycle than the fragment. Views can come and go as the fragment gets detached and attached.
If you do something inside your launch block that needs the views, than you probably want to bind this to the viewcycle of the views