Hey everyone :wave: how do you usually handle your...
# compose
k
Hey everyone 👋 how do you usually handle your higher composables (let's say a whole screen content) when that composable has a lot of parameters?
k
Oh, that's true, I remember reading that a while ago, but totally forgot about it now, thanks 🙏
l
I usually use interfaces to define functions, then implement with a class. Also helps with previews and testing and makes it more modular (if I see that the same composable can be reused, but different behaviour, I can make another class that implements the interface.
k
I believe state holders can also be used without issue in previews since they should only contain states, not flows or anything that's related to the business logic, I think I've also seen interfaces used as states, but I think their use case is different, since it adds an unnecessary extra layer