Hi! Does anyone know what's the use case for the `...
# compose
a
Hi! Does anyone know what's the use case for the
parent
argument in the 
setContent
 extension?
Copy code
public fun ComponentActivity.setContent(
    parent: CompositionContext? = null,
    content: @Composable () -> Unit
) {...}
I've never seen a sample using this argument 🤔
a
It can be used to set the content as a child composition. See the source for the explanation of
CompositionContext
. Normally you won’t need to specify this. Here’s an example usage.
a
oh thanks! Will take a look at this
z
Yep Dialog composables use this for example. Ensures that recompositions, composition locals, etc flow from the caller into the Dialog lambda.