mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
13 lines
254 B
Plaintext
13 lines
254 B
Plaintext
class {
|
|
onInput() {
|
|
this.state = { count:0 };
|
|
}
|
|
increment() {
|
|
this.state.count++;
|
|
}
|
|
}
|
|
|
|
<div key="current" style={ color:data.color }>
|
|
The current count is ${state.count}
|
|
</div>
|
|
<button on-click('increment')>+1</button> |