The BEST android courses in the world: [ Ссылка ]
In this video I show you the best way (for most scenarios) to use an observable data structure in your viewmodels when using jetpack compose. There's lots of different options: LiveData, StateFlow, SharedFlow, MutableState. But in my opinion for simple scenarios you should be using MutableState. It's easy to use and is optimized for jetpack compose.
Code: [ Ссылка ]
Follow me:
Instagram: [ Ссылка ]
Twitter: [ Ссылка ]
.
.
![](https://i.ytimg.com/vi/QDcBO4iROyE/maxresdefault.jpg)