Events as State are an Antipattern in MVI and MVVM - Here's Why
dev.to·18h·
Discuss: DEV
Flag this post

I decided to write an article on a hot topic in the Kotlin dev community about one-off events antipatterns.

The story begins with this article by Manuel Vivo:

ViewModel: One-off event antipatterns

I recommend that you read the article and especially the comments to understand the situation fully, but I’ll summarize the article:

Manuel Vivo argues that one-off events that happen inside the UI / UI logic layers of an application must be expressed as state variables instead of streams of objects that can be consumed by the UI components.

I left a comment under that article criticizing t…

Similar Posts

Loading similar posts...