Consider the following code:
@Composable
private fun SomeComposable() {
val lambda = {
Button(onClick = {}) {
Text("hello")
}
}
}
That gives me an error on the Button
with
@Composable invocations can only happen from the context of a @Composable function
So, how can I create a lambda for a composable? (I want to pass this around later on to another component).