I am using Google Firestore and MVVM pattern. As I know it is a good practice to avoid using singleton because of testing problems. But how should I work with Firestore correctly without it?
I am afraid that every time I create service instance in my View Model than new subscription to Firestore will be created. Also in case of MVVM, where is correct place to subscribe and unsubscribe to Firestore database? Should it happen in ViewModel or some service should handle this?