Event handlers may change the state of the declaring component:
fun a() {
var counter = 0
text("Clicked: $counter time(s)", onClick { counter++ })
}
The plugin does not call genPatchInternal of the declaring component automatically, but the onClick checks if the state is dirty and performs the call if so.
I don't know if it worth the trouble to add this to the plugin. After all, the number of these kind of instructions is quite limited.
Event handlers may change the state of the declaring component:
The plugin does not call
genPatchInternal
of the declaring component automatically, but theonClick
checks if the state is dirty and performs the call if so.I don't know if it worth the trouble to add this to the plugin. After all, the number of these kind of instructions is quite limited.
Have to think about this and clarify the design.