https://kotlinlang.org logo
Title
k

Kevin Worth

05/25/2023, 8:10 PM
When it comes to the Now in Android sample app , why is it good/ok that NiaAppState is not a ViewModel? We have
MainActivity
->
NiaApp
->
NiaAppState
->
UserNewsResourceRepository
and in all of this there's no ViewModel involved. As soon as we move to using Compose, how do we decide when a ViewModel is and isn't necessary?
f

Francesc

05/25/2023, 8:47 PM
see the comment just above yours. Not everything needs to be in a viewmodel, depending on your needs it's perfectly fine to store this in a state holder, as in the case of this example in the Nia app
y

Yves Kalume

05/26/2023, 1:49 PM