val users = mainVM.users.collectAsState().value
Does .collectAsState() return a State-object, which becomes updated each time the users-collection changes?
Is then .value called automatically each time?
How do I think about the whole mechanism?
Corresponding code from the ViewModel:
private var _users = MutableStateFlow<List<User>>(emptyList())
val users = _users.asStateFlow()