ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

Follow publication

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

Written by Fabio Collini

Android GDE || Android engineer @nytimes || author @androidavanzato || blogger @codingjam

Responses (3)

Write a response

Great article Fabio as usual. Isn't it better to don't pass the ViewModel to the composable, but instead decouple the composable into a stateful composable and a stateless composable? In this way we can test it in isolation or preview it in Android Studio easily.

--

great post! it helps me a lot.

--

Hi there, really cool post!, I like how mutableState() reduces the boilerplate code in the ViewModel :D.
I just wanted to add an small observation, by editing the fields v1 & v2 directly in the compose, and since compose itself is not origin or the…

--