how you deal with analytics in compose mvvm? where...
# compose
p
how you deal with analytics in compose mvvm? where you place the analytics initialization
firebaseAnalytics = Firebase.analytics
and where you log events
firebaseAnalytics.logEvent()
? maybe the best option is to have a singleton helper class with a logEvent method that you can call everywhere? Or placing it in a UseCase and inject it everywhere with Koin? what is better?
c
You really need to get better in researching. thats the most valuable skill for a software developer.
p
thank you, I already have now in android app, I didn't notice it uses analytics, but also I think is good to open a talk with the community in cases like this, to see more opinions and more approaches, because of that I proposed my two ideas, to compare them with other participants
c
there usually is no “better”. It’s your app, it’s your architecture, it’s your decision to make what fits you best. We don’t know anything about the app you are trying to build, nor the architecture you chose.