You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Composable
funExample(
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.
The text was updated successfully, but these errors were encountered:
Here is an example:
I'm seeing a lint error on both the
Box
as well as theDisposableEffect
saying that composable modifiers shouldn't be reused. Commenting out either removes the error.The text was updated successfully, but these errors were encountered: