Recomposition count

Report a typo

Match the following composables/recompositon scopes with their corresponding number of recompositions upon tapping the Button once on the screen rendered by the following code snippet.

Note: We don't consider the first rendering; only recompositions caused by tapping the Button.

@Composable
fun MyComposable() {
    var counter by remember {
        mutableStateOf(0)
    }
    Box {

        
        Column {

            Surface {

                CustomText(text = "Recomposed $counter times")
            }

            Button(onClick = { counter++ }) {

                Text(text = "Recomposed $counter times")
                Text(text = "Tap to recompose again")
                
            }
        }

    }
}
Match the items from left and right columns
Box
Surface Scope
Button
0
1
2

Create a free account to access the full topic