I have a composable that represents a screen, with...
# compose
g
I have a composable that represents a screen, with a list of items, a fab to add new items, edit buttons, delete buttons, so like 6 things I'm passing into this screen from the viewmodel
a
if you post the code we can give some recommendations
caller+callee if possible
g
@Adam Bennett I'll add more but this'll give the general gist (heh) https://gist.github.com/gabriel403/9ecdf69ad51af4e1d36dc4099a1d308b
a
seems ok in general, you might group those params into an interface and pass a single object implementing it. Maybe that's the ViewModel itself, maybe not. Depends on how much other responsibility your ViewModel takes on
g
Fair play, I can see a couple of ways of improving anyway, creating some composables higher up and passing them through into slots
👍 1