UI events are actions that should be handled in the UI layer, either by the UI or by the ViewModel, with the most common events being user events.
Android developers often ask why they should be using a data holder class (e.g. StateFlow) instead of other reactive solutions such as SharedFlow or Channel when working with events.
We’ll discuss these opposing options and potential issues, and explain a way of thinking about architecture modelling the result of your events as state, whether your UI is written in Compose or in View system.