-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Here is an example:
@Composable
fun Example(
modifier: Modifier = Modifier,
content: @Composable BoxScope.() -> Unit,
) {
val context = LocalContext.current
val currentContent by rememberUpdatedState(content)
val currentModifier by rememberUpdatedState(modifier)
val overlayView = remember {
ComposeView(context).apply {
setContent {
Box(currentModifier.fillMaxSize(), content = currentContent)
}
}
}
DisposableEffect(overlayView) {
onDispose {}
}
}I'm seeing a lint error on both the Box as well as the DisposableEffect saying that composable modifiers shouldn't be reused. Commenting out either removes the error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels