How To Handle ViewModel One Time Events In Jetpack Compose | Android Tutorial

preview_player
Показать описание
Medium article:

GitHub Repository:

Article from Manuel Vido:

Mentioned Droidcon Berlin 2022 talk:

Support me on Medium:

Follow me on:
Рекомендации по теме
Комментарии
Автор

Very well explained and I didn't know "compose-state-events" library.
Thanks to share.

Автор

Nice description of this approach! I have also used this library, but instead of including it as a dependency I just copied the source code. It is only 3 files and easy to understand.

dahlola
Автор

What if you need to show composable in the MainContent block based on the viewstate val?

Rafael-hkpg
Автор

Is google really pushing this jetpack compose cos its a recipe to make things more difficult, complicated n unpredictable.

Dabayare
Автор

omg... importing library for such a dumb things.. your serious? There is a Channel class created for that. Why don't you tell about that.

mrjackson
Автор

@yanneckreiss if we create event like "someEvent.value = AutoEvent(data="data", onConsumed={someEvent.value=null}). We would get a simplified version. What do you think about it?

Shus