This message was deleted.
# compose-android
s
This message was deleted.
k
List data is stored in a viewmodel btw.
s
Show your ViewModel, how is your StateFlow instantiated?
If you use .stateIn() you can pass in there if you want it to cache the last emitted value or not. And in your UI you just gotta do observeAsStateWithLifecycle to ensure that the StateFlow stops being hot when that screen is not available. You then avoid doing any launched effects or whatever to solve this
Why did you delete the question? 😅