Othman El Jazouli
09/15/2022, 1:11 PM@Composable
fun Container() {
SectionA()
SectionB()
}
@Composable
fun SectionA() {
var someState by remember { mutableStateOf(1) }
//...
someState = 2
}
@Composable
fun SectionB() {
}
would the whole Container()
and SectionA()
and SectionB()
recompose when changing someState
? or only SectionA()
?
wondering if there is any potential composition lag if the screen is too largeMR3Y
09/15/2022, 2:13 PMSectionA()
, here you can read more about recomposition scopes: https://dev.to/zachklipp/scoped-recomposition-jetpack-compose-what-happens-when-state-changes-l78