```@Composable fun SomeComposableFunction() { ...
# compose
k
Copy code
@Composable
fun SomeComposableFunction() {
    val t = animatedFloat(0f)
    Canvas(modifier = Modifier.fillMaxWidth()) {

        // this gives error during compile/build
        onActive {

        }



        //Can't do this as well
        val someValue = remember {

        }



    }
}
is this expected behaviour? we can't access Composables inside lambda's which are in turn inside some composable?
a
yes, this is expected, it's like trying to call a
suspend
function from a non-suspending lambda block passed to a function call inside a suspending function.
k
Thank you for your quick respone @Adam Powell 🙂
👍 1
a
e.g.:
Copy code
fooScope.launch {
    view.setOnClickListener {
        something.await() // error
    }
}
there are varieties of inlining you can do that will permit both of these things, however. For example,
something.apply { }