mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
16 lines
284 B
Plaintext
16 lines
284 B
Plaintext
class {
|
|
onInput() {
|
|
if (!this.state) {
|
|
this.state = {
|
|
count: 0
|
|
};
|
|
}
|
|
}
|
|
increment() {
|
|
this.state.count++;
|
|
}
|
|
}
|
|
|
|
<div style={ color:input.color }>
|
|
Current count is <span.count>${state.count}</span>
|
|
</div> |