mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
13 lines
239 B
Plaintext
13 lines
239 B
Plaintext
class {
|
|
onCreate() {
|
|
this.state = {
|
|
count: 0
|
|
}
|
|
}
|
|
handleCountChange(value) {
|
|
this.state.count = value
|
|
}
|
|
}
|
|
|
|
<counter key="counter" on-change('handleCountChange')/>
|
|
<div>${state.count}</div> |