rakshakhegde / DaggerAndroidInjector

Dagger Sample Project on how to use the new dagger-android module for Dagger v2.11
193 stars 24 forks source link

MVVM issue #1

Open gaara87 opened 7 years ago

gaara87 commented 7 years ago

From whatever i've done and read, you have claimed that you are following the MVVM pattern, but I think its incorrect for the ViewModel to contain a reference of the View.

rakshakhegde commented 7 years ago

I like my approach because it's easy to write Unit Tests for it. Else I'll have a bit more logic stuck in View. This is my approach.

RJ-Clegg commented 7 years ago

I tend to agree with @gaara87 Here. This is not an ideal use of the MVVM paradigm. UI stuff should never touch the ViewModel.