And why can't you overload a method and add @Composable to it?
a
Adam Powell
10/09/2022, 3:03 PM
Do you mean override instead of overload?Adding
@Composable
adds hidden parameters to the method signature that the caller of an abstract method doesn't provide. It's these hidden parameters that provide the state about the composable function's current place in the composition
Adam Powell
10/09/2022, 3:03 PM
it's the same reason why you can't add
suspend
to a method override when the base class/interface doesn't have it on the method