ursus
11/11/2025, 12:02 AMSnapshotStateList appear atomic? I figured it would recompose twice but does seems to only once. Is it only recomposing come VSync time? Is this guaranteed?
(Real use case is navigation 3 where I want to push multiple screens, or rather mutate backstack more deeply and it needs to be in one "transaction")ursus
11/11/2025, 12:02 AMval list = remember { mutableStateListOf("") }
Column(
modifier = Modifier
.fillMaxSize()
) {
for (item in list) {
Text(item)
}
Button(
onClick = {
list += "Hello"
list += "World"
}
) {
Text("Click me")
}
}ursus
11/11/2025, 12:04 AMbackStack.removeLastOrNull()
backStack += NewScreen(data = ...)Ian Lake
11/11/2025, 1:39 AMursus
11/11/2025, 2:09 AM