This message was deleted.
# compose
s
This message was deleted.
r
What limitation? This is indeed how you would simplify your code or create reusable UI chunks
k
@romainguy For example the
@Composable MyButton(onClick, text, icon)
function, except label and icon I can't add more things to it. I don't want to change original function. So I think my custom function is unnecessary. 😔
r
You can make your new function accept one or more composable lambdas (what we call "slots") so the caller can customize the content
Which is exactly what you do with IconButton, you pass a lambda to put an Icon inside
k
Yes, I can do that.