https://kotlinlang.org logo
#compose
Title
# compose
a

Animesh Sahu

11/13/2020, 11:33 AM
From the Thinking in Compose video

https://www.youtube.com/watch?v=SMOhl9RK0BA?t=10m41s

How would you manage all the click events with single
content: @Composable () -> Unit
lambda? How would somebody handle the click events inside the lambda?
z

Zach Klippenstein (he/him) [MOD]

11/13/2020, 3:45 PM
I think of it like changing the
ChatBubble
component from being a whole component that defines its own behavior to simple a layout/decorator that defines style. You can put whatever other components you want as children, and those children are each responsible for their own event handling.
a

Animesh Sahu

11/13/2020, 3:46 PM
Ao, I see. Thanks!
8 Views