Slide 12
Slide 12 text
🔎 Code Generation
fun Counter(composer: Composer, changed: Int) {
composer.startRestartGroup(001)
if (changed
=
=
0
&
&
composer.getSkipping()) {
composer.skipToGroupEnd()
} else {
var count by remember(composer, 0) {
mutableStateOf(0)
}
Text(
composer,
0,
"Count: $count”,
Modifier.clickable { count
+
+
},
)
}
composer.endRestartGroup()
?
.
let {
it.updateScope { composer, force
->
Counter(composer, changed or 1)
}
}
}
@CanyuDev