In the Compose tutorials, it is advised to use State in the ViewModel as much as possible because it makes the code simpler and it's right BUT is State lifecycle aware like LiveData ? Can we achieve the same ?
h
Halil Ozercan
11/06/2020, 4:28 PM
Compose itself is ofc lifecycle aware. You are not going to accidentally update a view that doesn't exist anymore because activity or fragment is destroyed. View "updates" itself anyway.
d
David Attias
11/06/2020, 4:47 PM
thanks @Halil Ozercan, i didnt see it that way but you're right.