Lifecycle scoping
Uber's https://github.com/uber/AutoDispose is a great library that automatically unsubscribe Observables
as indicated by some scope, this allow us to bind the Observable with a Lifecycle(Fragment, Activity, view, etc...).
To use this feature all you need to do is to call .scoped()
and pass in a LifecycleScopedProvider
AutoDispose already comes with handy methods that we can use to build a LifecycleScopeProvider
from a LifecycleOwner
so all we need to do is to call