Denis
counts
Count
@Composable fun CounterApp() { var counts by remember { mutableStateOf(listOf<Int>()) } var taps by remember { mutableStateOf(0) } Column( modifier = Modifier.fillMaxSize().clickable(onClick = { counts = listOf(taps) + counts; taps++ }) ) { Text("$taps"); Divider(); counts.forEach { Count(it) } } } @Composable fun Count(n: Int) { Log.d("Count", "$n") Text("$n") }
Rafs
mutableStateOf(listOf<Int>))
mutableStateListOf<Int>
A modern programming language that makes developers happier.