https://kotlinlang.org logo
#compose-android
Title
# compose-android
s

Slackbot

02/29/2024, 12:41 PM
This message was deleted.
k

kecaroh

02/29/2024, 12:43 PM
List data is stored in a viewmodel btw.
s

Stylianos Gakis

02/29/2024, 12:44 PM
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? 😅
3 Views