```@Composable private fun QuickActionsScreen( ...
# compose
o
Copy code
@Composable
private fun QuickActionsScreen(
    quickActionItems: ImmutableList<QuickActionItem>,
    onActionClicked: (QuickActionItem) -> Unit
) {
    Row(
        verticalAlignment = Alignment.CenterVertically,
        horizontalArrangement = Arrangement.Center,
        modifier = Modifier.fillMaxWidth()
    ) {
        quickActionItems.forEach { quickAction ->
            Column(
                horizontalAlignment = Alignment.CenterHorizontally,
                modifier = Modifier.clickable { onActionClicked(quickAction) }
            ) {
                // Content of the Column
            }
        }
    }
}

data class QuickActionItem(
    val title: String,
    val enabled: Boolean,
    val action: QuickAction // enum
)
Im checking layout inspector and seeing that
QuickActionsScreen
is recomposed about 15 times, but if I remove
modifier = Modifier.clickable { onActionClicked(quickAction) }
then all recompositions are skipped, is this expected? and is there a way to fix it because I have a lot of composable shown in a dashboard and they all suffer the same thing, and I suspect that’s why it causes the screen to lag a little
m
check if QuickActionItem is stable. You can also pass and id instead of QuickActionItem and remember it