Hello, Is there issues trying to use `CompositionL...
# compose
h
Hello, Is there issues trying to use
CompositionLocal
to pass composable lambda to a child composable? Something like below.
Copy code
val LocalComposable = compositionLocalOf<@Composable (Modifier) -> Unit> { { Box {} } }

@Composable
fun DescendantDeepInHiearchy() {
    LocalComposable.current
}
I did see in the Alternatives to Consider section about IOC, mentioning composable lambdas benefiting from IOC. I didn't find whether it would be a good or bad idea to to use composable lambdas in
CompositionLocal
j
I personally think it makes more sense to pass a
@Composable
lambda “down the chain”. It follows patterns already establish in Compose. All layouts take a composable lambdas and use them display content.