I'm working with compose now for several weeks and some things are still quite challenging or weird I think.
My newest feature requires a BottomSheet
, a ModalBottomSheet
to be precise.
When inspecting via the Layout Inspector it shows me, that the ModalBottomSheet sheetcontent
, that is a surface
, produces enormous recomposition counts. (I'm talking about hundres per second):
I even tried emptying the whole ModalBottomSheet
so it's only an empty shell like this:
val sheetState = rememberModalBottomSheetState(
initialValue = ModalBottomSheetValue.Hidden,
confirmStateChange = { it != ModalBottomSheetValue.HalfExpanded },
skipHalfExpanded = true,
)
ModalBottomSheetLayout(
sheetState = sheetState,
sheetShape = CustomTheme.shapes.bottomSheetRadius,
sheetContent = {
Column(modifier = Modifier.padding(bottom = 10.sdp)) {
}
}
) {
}
Someone experienced the same? I can not find anyone complaining about this.. But this can not be okay I think.